Skip to content
Snippets Groups Projects
yang.go 807 KiB
Newer Older
  • Learn to ignore specific revisions
  • 		t.ConnectivityService = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := ConnectivityServiceUuid
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.ConnectivityService[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService{
    		ConnectivityServiceUuid: &ConnectivityServiceUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.ConnectivityService[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewEndPoint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := LocalId
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.EndPoint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint{
    		LocalId: &LocalId,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.EndPoint[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_Name, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := ValueName
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.Name[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_Name{
    		ValueName: &ValueName,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.Name[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewTopologyConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := LocalId
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.TopologyConstraint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint{
    		LocalId: &LocalId,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.TopologyConstraint[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // Λ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) {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"connection-uuid": *t.ConnectionUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}, 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // interface. This allows functions that need to handle this struct to
    // identify it as being generated by ygen.
    
    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
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"connectivity-service-uuid": *t.ConnectivityServiceUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}, 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"connectivity-service-uuid": *t.ConnectivityServiceUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}, 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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_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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	TopologyUuid	string	`path:"topology-uuid"`
    	NodeUuid	string	`path:"node-uuid"`
    	NodeEdgePointUuid	string	`path:"node-edge-point-uuid"`
    
    	ConnectionEndPointUuid	string	`path:"connection-end-point-uuid"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key{
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		TopologyUuid: TopologyUuid,
    		NodeUuid: NodeUuid,
    
    		NodeEdgePointUuid: NodeEdgePointUuid,
    		ConnectionEndPointUuid: ConnectionEndPointUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.ConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint{
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		TopologyUuid: &TopologyUuid,
    		NodeUuid: &NodeUuid,
    
    		NodeEdgePointUuid: &NodeEdgePointUuid,
    		ConnectionEndPointUuid: &ConnectionEndPointUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.ConnectionEndPoint[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := ValueName
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.Name[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name{
    		ValueName: &ValueName,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.Name[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // Λ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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return map[string]interface{}{
    		"local-id": *t.LocalId,
    	}, nil
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	if t.NodeEdgePointUuid == nil {
    		return nil, fmt.Errorf("nil value for key NodeEdgePointUuid")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	if t.NodeUuid == nil {
    		return nil, fmt.Errorf("nil value for key NodeUuid")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	if t.TopologyUuid == nil {
    		return nil, fmt.Errorf("nil value for key TopologyUuid")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return map[string]interface{}{
    		"value-name": *t.ValueName,
    	}, nil
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // Λ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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // Λ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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"value-name": *t.ValueName,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}, 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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_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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	// 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)
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	key := LocalId
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.ResiliencyRouteConstraint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint{
    		LocalId: &LocalId,
    	}
    
    	return t.ResiliencyRouteConstraint[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    // 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 {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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 }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // 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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType implements the yang.GoStruct
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // Λ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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := ValueName
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.Name[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name{
    		ValueName: &ValueName,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	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"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // 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() {}
    
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // 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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// 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)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	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{
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    		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
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.