Newer
Older
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
}
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic)
// 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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
return t.RiskDiversityCharacteristic[key], nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-connectivity"`
CostName *string `path:"cost-name" module:"tapi-connectivity"`
CostValue *string `path:"cost-value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-connectivity"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-connectivity"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-connectivity"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-connectivity"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-connectivity"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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.
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-connectivity"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-connectivity"`
ExcludeLink *string `path:"exclude-link" module:"tapi-connectivity"`
ExcludeNode *string `path:"exclude-node" module:"tapi-connectivity"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-connectivity"`
ExcludePath *string `path:"exclude-path" module:"tapi-connectivity"`
IncludeLink *string `path:"include-link" module:"tapi-connectivity"`
IncludeNode *string `path:"include-node" module:"tapi-connectivity"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-connectivity"`
IncludePath *string `path:"include-path" module:"tapi-connectivity"`
IncludeTopology *string `path:"include-topology" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name `path:"name" module:"tapi-connectivity"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-connectivity"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-connectivity"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-connectivity"`
LatencyCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-connectivity"`
MaxAllowedCost *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-connectivity"`
MaxAllowedDelay *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-connectivity"`
MaxAllowedHops *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-connectivity"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-connectivity"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-connectivity"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic, error){
// 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_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic)
// 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_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
return t.CostCharacteristic[key], nil
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic)
// 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_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic)
}
// 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_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
}
return t.RiskDiversityCharacteristic[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-connectivity"`
CostName *string `path:"cost-name" module:"tapi-connectivity"`
CostValue *string `path:"cost-value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-connectivity"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-connectivity"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-connectivity"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-connectivity"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-connectivity"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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.
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-connectivity"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-connectivity"`
ExcludeLink *string `path:"exclude-link" module:"tapi-connectivity"`
ExcludeNode *string `path:"exclude-node" module:"tapi-connectivity"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-connectivity"`
ExcludePath *string `path:"exclude-path" module:"tapi-connectivity"`
IncludeLink *string `path:"include-link" module:"tapi-connectivity"`
IncludeNode *string `path:"include-node" module:"tapi-connectivity"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-connectivity"`
IncludePath *string `path:"include-path" module:"tapi-connectivity"`
IncludeTopology *string `path:"include-topology" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name `path:"name" module:"tapi-connectivity"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_TopologyConstraint_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_ConnectivityContext_ConnectivityService_TopologyConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) Λ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_ConnectivityContext_ConnectivityService_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_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_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_Name represents the /tapi-common/context/name YANG schema element.
type TapiCommon_Context_Name struct {
Value *string `path:"value" module:"tapi-common"`
ValueName *string `path:"value-name" module:"tapi-common"`
// IsYANGGoStruct ensures that TapiCommon_Context_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_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_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_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_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_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext represents the /tapi-common/context/path-computation-context YANG schema element.
type TapiCommon_Context_PathComputationContext struct {
Path map[string]*TapiCommon_Context_PathComputationContext_Path `path:"path" module:"tapi-path-computation"`
PathCompService map[string]*TapiCommon_Context_PathComputationContext_PathCompService `path:"path-comp-service" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext 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) IsYANGGoStruct() {}
// NewPath creates a new entry in the Path list of the
// TapiCommon_Context_PathComputationContext struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext) NewPath(Uuid string) (*TapiCommon_Context_PathComputationContext_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_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_Path{
Uuid: &Uuid,
// NewPathCompService creates a new entry in the PathCompService list of the
// TapiCommon_Context_PathComputationContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext) NewPathCompService(Uuid string) (*TapiCommon_Context_PathComputationContext_PathCompService, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.PathCompService == nil {
t.PathCompService = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService)
// 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.PathCompService[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list PathCompService", key)
}
t.PathCompService[key] = &TapiCommon_Context_PathComputationContext_PathCompService{
Uuid: &Uuid,
}
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext"], 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) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path represents the /tapi-common/context/path-computation-context/path YANG schema element.
type TapiCommon_Context_PathComputationContext_Path struct {
Direction E_TapiPathComputation_ForwardingDirection `path:"direction" module:"tapi-path-computation"`
LayerProtocolName E_TapiPathComputation_LayerProtocolName `path:"layer-protocol-name" module:"tapi-path-computation"`
Link map[TapiCommon_Context_PathComputationContext_Path_Link_Key]*TapiCommon_Context_PathComputationContext_Path_Link `path:"link" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_Path_Name `path:"name" module:"tapi-path-computation"`
RoutingConstraint *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint `path:"routing-constraint" module:"tapi-path-computation"`
Uuid *string `path:"uuid" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_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_Path) IsYANGGoStruct() {}
// TapiCommon_Context_PathComputationContext_Path_Link_Key represents the key for list Link of element /tapi-common/context/path-computation-context/path.
type TapiCommon_Context_PathComputationContext_Path_Link_Key struct {
TopologyUuid string `path:"topology-uuid"`
LinkUuid string `path:"link-uuid"`
// NewLink creates a new entry in the Link list of the
// TapiCommon_Context_PathComputationContext_Path struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path) NewLink(TopologyUuid string, LinkUuid string) (*TapiCommon_Context_PathComputationContext_Path_Link, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Link == nil {
t.Link = make(map[TapiCommon_Context_PathComputationContext_Path_Link_Key]*TapiCommon_Context_PathComputationContext_Path_Link)
key := TapiCommon_Context_PathComputationContext_Path_Link_Key{
TopologyUuid: TopologyUuid,
LinkUuid: LinkUuid,
// 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.Link[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Link", key)
}
t.Link[key] = &TapiCommon_Context_PathComputationContext_Path_Link{
TopologyUuid: &TopologyUuid,
LinkUuid: &LinkUuid,
}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_Path struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_Path_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_Path_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_Path_Name{
ValueName: &ValueName,
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path) Λ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_Path) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_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_Path) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService represents the /tapi-common/context/path-computation-context/path-comp-service YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService struct {
Direction E_TapiPathComputation_ForwardingDirection `path:"direction" module:"tapi-path-computation"`
EndPoint map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint `path:"end-point" module:"tapi-path-computation"`
LayerProtocolName E_TapiPathComputation_LayerProtocolName `path:"layer-protocol-name" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Name `path:"name" module:"tapi-path-computation"`
ObjectiveFunction *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction `path:"objective-function" module:"tapi-path-computation"`
OptimizationConstraint *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint `path:"optimization-constraint" module:"tapi-path-computation"`
Path map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Path `path:"path" module:"tapi-path-computation"`
RoutingConstraint *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint `path:"routing-constraint" module:"tapi-path-computation"`
TopologyConstraint map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint `path:"topology-constraint" module:"tapi-path-computation"`
Uuid *string `path:"uuid" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService 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) IsYANGGoStruct() {}
// NewEndPoint creates a new entry in the EndPoint list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewEndPoint(LocalId string) (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.EndPoint == nil {
t.EndPoint = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint)
// 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.EndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list EndPoint", key)
t.EndPoint[key] = &TapiCommon_Context_PathComputationContext_PathCompService_EndPoint{
LocalId: &LocalId,