Newer
Older
t.ConnectivityService = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService)
// 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.ConnectivityService[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ConnectivityService", key)
t.ConnectivityService[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService{
ConnectivityServiceUuid: &ConnectivityServiceUuid,
return t.ConnectivityService[key], nil
// NewEndPoint creates a new entry in the EndPoint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewEndPoint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint{
LocalId: &LocalId,
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_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_Name{
ValueName: &ValueName,
// NewTopologyConstraint creates a new entry in the TopologyConstraint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewTopologyConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_TopologyConstraint{
LocalId: &LocalId,
return t.TopologyConstraint[key], nil
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) Λ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_ConnectivityContext_ConnectivityService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService"], 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) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection represents the /tapi-common/context/connectivity-context/connectivity-service/connection YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection 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_Connection) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
"connection-uuid": *t.ConnectionUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection"], 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_Connection) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint struct {
ConnectionExclusion []string `path:"connection-exclusion" module:"tapi-connectivity"`
ConnectionInclusion []string `path:"connection-inclusion" module:"tapi-connectivity"`
CorouteInclusion *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion `path:"coroute-inclusion" module:"tapi-connectivity"`
DiversityExclusion map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion `path:"diversity-exclusion" module:"tapi-connectivity"`
RequestedCapacity *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity `path:"requested-capacity" module:"tapi-connectivity"`
Schedule *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule `path:"schedule" module:"tapi-connectivity"`
ServiceLevel *string `path:"service-level" module:"tapi-connectivity"`
ServiceType E_TapiConnectivity_ServiceType `path:"service-type" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) IsYANGGoStruct() {}
// NewDiversityExclusion creates a new entry in the DiversityExclusion list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) NewDiversityExclusion(ConnectivityServiceUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.DiversityExclusion == nil {
t.DiversityExclusion = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion)
}
key := ConnectivityServiceUuid
// 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.DiversityExclusion[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list DiversityExclusion", key)
}
t.DiversityExclusion[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion{
ConnectivityServiceUuid: &ConnectivityServiceUuid,
}
return t.DiversityExclusion[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint"], 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_ConnectivityConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/coroute-inclusion YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion struct {
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion 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_ConnectivityConstraint_CorouteInclusion) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion"], 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_ConnectivityConstraint_CorouteInclusion) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/diversity-exclusion YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion struct {
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion 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_ConnectivityConstraint_DiversityExclusion) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectivityServiceUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectivityServiceUuid")
"connectivity-service-uuid": *t.ConnectivityServiceUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion"], 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_ConnectivityConstraint_DiversityExclusion) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/requested-capacity YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity struct {
TotalSize *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize `path:"total-size" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity 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_ConnectivityConstraint_RequestedCapacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity"], 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_ConnectivityConstraint_RequestedCapacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/requested-capacity/total-size YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_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_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_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_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/schedule YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule struct {
EndTime *string `path:"end-time" module:"tapi-connectivity"`
StartTime *string `path:"start-time" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule 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_ConnectivityConstraint_Schedule) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule"], 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_ConnectivityConstraint_Schedule) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-service YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService struct {
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService 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_ConnectivityService) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectivityServiceUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectivityServiceUuid")
"connectivity-service-uuid": *t.ConnectivityServiceUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService"], 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.
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct {
AdministrativeState E_TapiCommon_AdministrativeState `path:"administrative-state" module:"tapi-connectivity"`
Capacity *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity `path:"capacity" module:"tapi-connectivity"`
ConnectionEndPoint map[TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint `path:"connection-end-point" module:"tapi-connectivity"`
Direction E_TapiConnectivity_PortDirection `path:"direction" module:"tapi-connectivity"`
LayerProtocolName E_TapiConnectivity_LayerProtocolName `path:"layer-protocol-name" module:"tapi-connectivity"`
LayerProtocolQualifier E_TapiConnectivity_LayerProtocolQualifier `path:"layer-protocol-qualifier" module:"tapi-connectivity"`
LifecycleState E_TapiCommon_LifecycleState `path:"lifecycle-state" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name `path:"name" module:"tapi-connectivity"`
OperationalState E_TapiCommon_OperationalState `path:"operational-state" module:"tapi-connectivity"`
PeerFwdConnectivityServiceEndPoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint `path:"peer-fwd-connectivity-service-end-point" module:"tapi-connectivity"`
ProtectingConnectivityServiceEndPoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint `path:"protecting-connectivity-service-end-point" module:"tapi-connectivity"`
ProtectionRole E_TapiConnectivity_ProtectionRole `path:"protection-role" module:"tapi-connectivity"`
Role E_TapiConnectivity_PortRole `path:"role" module:"tapi-connectivity"`
ServerConnectivityServiceEndPoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint `path:"server-connectivity-service-end-point" module:"tapi-connectivity"`
ServiceInterfacePoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint `path:"service-interface-point" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key represents the key for list ConnectionEndPoint of element /tapi-common/context/connectivity-context/connectivity-service/end-point.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key struct {
TopologyUuid string `path:"topology-uuid"`
NodeUuid string `path:"node-uuid"`
NodeEdgePointUuid string `path:"node-edge-point-uuid"`
ConnectionEndPointUuid string `path:"connection-end-point-uuid"`
// NewConnectionEndPoint creates a new entry in the ConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ConnectionEndPoint == nil {
t.ConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint)
key := TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key{
NodeEdgePointUuid: NodeEdgePointUuid,
ConnectionEndPointUuid: ConnectionEndPointUuid,
}
// 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.ConnectionEndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ConnectionEndPoint", key)
t.ConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint{
NodeEdgePointUuid: &NodeEdgePointUuid,
ConnectionEndPointUuid: &ConnectionEndPointUuid,
return t.ConnectionEndPoint[key], nil
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint_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_EndPoint_Name{
ValueName: &ValueName,
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) Λ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_ConnectivityContext_ConnectivityService_EndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint"], 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_EndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/capacity YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity struct {
TotalSize *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize `path:"total-size" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint_Capacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity"], 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_EndPoint_Capacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/capacity/total-size YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize"], 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_EndPoint_Capacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint struct {
ConnectionEndPointUuid *string `path:"connection-end-point-uuid" module:"tapi-connectivity"`
NodeEdgePointUuid *string `path:"node-edge-point-uuid" module:"tapi-connectivity"`
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint 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_EndPoint_ConnectionEndPoint) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionEndPointUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
if t.NodeEdgePointUuid == nil {
return nil, fmt.Errorf("nil value for key NodeEdgePointUuid")
if t.NodeUuid == nil {
return nil, fmt.Errorf("nil value for key NodeUuid")
if t.TopologyUuid == nil {
return nil, fmt.Errorf("nil value for key TopologyUuid")
return map[string]interface{}{
"connection-end-point-uuid": *t.ConnectionEndPointUuid,
"node-edge-point-uuid": *t.NodeEdgePointUuid,
"node-uuid": *t.NodeUuid,
"topology-uuid": *t.TopologyUuid,
}, nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint"], 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_EndPoint_ConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_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_ConnectivityContext_ConnectivityService_EndPoint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name"], 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_EndPoint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/peer-fwd-connectivity-service-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint struct {
ConnectivityServiceEndPointLocalId *string `path:"connectivity-service-end-point-local-id" module:"tapi-connectivity"`
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint 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_EndPoint_PeerFwdConnectivityServiceEndPoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint"], 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_EndPoint_PeerFwdConnectivityServiceEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/protecting-connectivity-service-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint struct {
ConnectivityServiceEndPointLocalId *string `path:"connectivity-service-end-point-local-id" module:"tapi-connectivity"`
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint 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_EndPoint_ProtectingConnectivityServiceEndPoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint"], 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_EndPoint_ProtectingConnectivityServiceEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/server-connectivity-service-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint struct {
ConnectivityServiceEndPointLocalId *string `path:"connectivity-service-end-point-local-id" module:"tapi-connectivity"`
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint 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_EndPoint_ServerConnectivityServiceEndPoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint"], 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_EndPoint_ServerConnectivityServiceEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/service-interface-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint struct {
ServiceInterfacePointUuid *string `path:"service-interface-point-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint"], 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_EndPoint_ServiceInterfacePoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_Name represents the /tapi-common/context/connectivity-context/connectivity-service/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_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_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_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.
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint struct {
FaultConditionDetermination E_TapiConnectivity_FaultConditionDetermination `path:"fault-condition-determination" module:"tapi-connectivity"`
HoldOffTime *uint64 `path:"hold-off-time" module:"tapi-connectivity"`
IsCoordinatedSwitchingBothEnds *bool `path:"is-coordinated-switching-both-ends" module:"tapi-connectivity"`
IsFrozen *bool `path:"is-frozen" module:"tapi-connectivity"`
IsLockOut *bool `path:"is-lock-out" module:"tapi-connectivity"`
MaxSwitchTimes *uint64 `path:"max-switch-times" module:"tapi-connectivity"`
PreferredRestorationLayer []E_TapiConnectivity_LayerProtocolName `path:"preferred-restoration-layer" module:"tapi-connectivity"`
ResilienceType *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType `path:"resilience-type" module:"tapi-connectivity"`
ResiliencyRouteConstraint map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint `path:"resiliency-route-constraint" module:"tapi-connectivity"`
RestorationCoordinateType E_TapiConnectivity_CoordinateType `path:"restoration-coordinate-type" module:"tapi-connectivity"`
RestorePriority *uint64 `path:"restore-priority" module:"tapi-connectivity"`
ReversionMode E_TapiConnectivity_ReversionMode `path:"reversion-mode" module:"tapi-connectivity"`
SelectionControl E_TapiConnectivity_SelectionControl `path:"selection-control" module:"tapi-connectivity"`
WaitToRevertTime *uint64 `path:"wait-to-revert-time" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint 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) IsYANGGoStruct() {}
// NewResiliencyRouteConstraint creates a new entry in the ResiliencyRouteConstraint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint) NewResiliencyRouteConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ResiliencyRouteConstraint == nil {
t.ResiliencyRouteConstraint = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint)
}
// 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.ResiliencyRouteConstraint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ResiliencyRouteConstraint", key)
t.ResiliencyRouteConstraint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint{
LocalId: &LocalId,
}
return t.ResiliencyRouteConstraint[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint"], 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) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resilience-type YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType struct {
ProtectionType E_TapiTopology_ProtectionType `path:"protection-type" module:"tapi-connectivity"`
RestorationPolicy E_TapiTopology_RestorationPolicy `path:"restoration-policy" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType 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_ResilienceType) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType"], t, opts...); err != nil {
return err
}
return nil
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
// Λ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_ResilienceType) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint struct {
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name `path:"name" module:"tapi-connectivity"`
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
RoutingConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint `path:"routing-constraint" module:"tapi-connectivity"`
TopologyConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint `path:"topology-constraint" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint 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) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_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_Name{
ValueName: &ValueName,
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) Λ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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint"], 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) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_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_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-connectivity"`
MaxAllowedCost *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-connectivity"`
MaxAllowedDelay *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-connectivity"`
MaxAllowedHops *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-connectivity"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ResilienceConstraint_ResiliencyRouteConstraint_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_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic 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) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
}
return t.CostCharacteristic[key], nil
}
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic 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) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.