Newer
Older
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Name)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_Name{
ValueName: &ValueName,
// NewPath creates a new entry in the Path list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewPath(PathUuid string) (*TapiCommon_Context_PathComputationContext_PathCompService_Path, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Path == nil {
t.Path = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Path)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Path[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Path", key)
t.Path[key] = &TapiCommon_Context_PathComputationContext_PathCompService_Path{
PathUuid: &PathUuid,
// NewTopologyConstraint creates a new entry in the TopologyConstraint list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewTopologyConstraint(LocalId string) (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.TopologyConstraint == nil {
t.TopologyConstraint = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.TopologyConstraint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list TopologyConstraint", key)
t.TopologyConstraint[key] = &TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint{
LocalId: &LocalId,
return t.TopologyConstraint[key], nil
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint represents the /tapi-common/context/path-computation-context/path-comp-service/end-point YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct {
Capacity *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity `path:"capacity" module:"tapi-path-computation"`
Direction E_TapiPathComputation_PortDirection `path:"direction" module:"tapi-path-computation"`
LayerProtocolName E_TapiPathComputation_LayerProtocolName `path:"layer-protocol-name" module:"tapi-path-computation"`
LayerProtocolQualifier E_TapiPathComputation_LayerProtocolQualifier `path:"layer-protocol-qualifier" module:"tapi-path-computation"`
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name `path:"name" module:"tapi-path-computation"`
Role E_TapiPathComputation_PortRole `path:"role" module:"tapi-path-computation"`
ServiceInterfacePoint *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint `path:"service-interface-point" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name)
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/capacity YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity struct {
TotalSize *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize `path:"total-size" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/capacity/total-size YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/service-interface-point YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint struct {
ServiceInterfacePointUuid *string `path:"service-interface-point-uuid" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_Name represents the /tapi-common/context/path-computation-context/path-comp-service/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction represents the /tapi-common/context/path-computation-context/path-comp-service/objective-function YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction struct {
BandwidthOptimization E_TapiPathComputation_DirectiveValue `path:"bandwidth-optimization" module:"tapi-path-computation"`
ConcurrentPaths E_TapiPathComputation_DirectiveValue `path:"concurrent-paths" module:"tapi-path-computation"`
CostOptimization E_TapiPathComputation_DirectiveValue `path:"cost-optimization" module:"tapi-path-computation"`
LinkUtilization E_TapiPathComputation_DirectiveValue `path:"link-utilization" module:"tapi-path-computation"`
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name `path:"name" module:"tapi-path-computation"`
ResourceSharing E_TapiPathComputation_DirectiveValue `path:"resource-sharing" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
func (*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name represents the /tapi-common/context/path-computation-context/path-comp-service/objective-function/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/optimization-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint struct {
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name `path:"name" module:"tapi-path-computation"`
TrafficInterruption E_TapiPathComputation_DirectiveValue `path:"traffic-interruption" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
func (*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/optimization-constraint/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_Path represents the /tapi-common/context/path-computation-context/path-comp-service/path YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_Path struct {
PathUuid *string `path:"path-uuid" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_Path implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_Path) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_Path struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) ΛListKeyMap() (map[string]interface{}, error) {
if t.PathUuid == nil {
return nil, fmt.Errorf("nil value for key PathUuid")
}
return map[string]interface{}{
"path-uuid": *t.PathUuid,
}, nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_Path"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-path-computation"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-path-computation"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-path-computation"`
LatencyCharacteristic map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-path-computation"`
MaxAllowedCost *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-path-computation"`
MaxAllowedDelay *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-path-computation"`
MaxAllowedHops *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-path-computation"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-path-computation"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-path-computation"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic, error){
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic)
}
key := CostName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
}
t.CostCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
}
return t.CostCharacteristic[key], nil
}
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic)
}
key := TrafficPropertyName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
}
t.LatencyCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
}
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic)
}
key := RiskCharacteristicName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
}
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
}
return t.RiskDiversityCharacteristic[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-path-computation"`
CostName *string `path:"cost-name" module:"tapi-path-computation"`
CostValue *string `path:"cost-value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}
return map[string]interface{}{
"cost-name": *t.CostName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-path-computation"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-path-computation"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-path-computation"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-path-computation"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
}
return map[string]interface{}{
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-path-computation"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
}
return map[string]interface{}{
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/topology-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-path-computation"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-path-computation"`
ExcludeLink *string `path:"exclude-link" module:"tapi-path-computation"`
ExcludeNode *string `path:"exclude-node" module:"tapi-path-computation"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-path-computation"`
ExcludePath *string `path:"exclude-path" module:"tapi-path-computation"`
IncludeLink *string `path:"include-link" module:"tapi-path-computation"`
IncludeNode *string `path:"include-node" module:"tapi-path-computation"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-path-computation"`
IncludePath *string `path:"include-path" module:"tapi-path-computation"`
IncludeTopology *string `path:"include-topology" module:"tapi-path-computation"`
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name `path:"name" module:"tapi-path-computation"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}
return map[string]interface{}{
"local-id": *t.LocalId,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/topology-constraint/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_Link represents the /tapi-common/context/path-computation-context/path/link YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_Link struct {
LinkUuid *string `path:"link-uuid" module:"tapi-path-computation"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_Link implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_Link) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_Link struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_Link) ΛListKeyMap() (map[string]interface{}, error) {
if t.LinkUuid == nil {
return nil, fmt.Errorf("nil value for key LinkUuid")
}
if t.TopologyUuid == nil {
return nil, fmt.Errorf("nil value for key TopologyUuid")
}
return map[string]interface{}{
"link-uuid": *t.LinkUuid,
"topology-uuid": *t.TopologyUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_Link) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_Link"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_Path_Link) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_Name represents the /tapi-common/context/path-computation-context/path/name YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_Name"], t, opts...); err != nil {
return err
}
return nil