Skip to content
Snippets Groups Projects
yang.go 1.06 MiB
Newer Older
  • Learn to ignore specific revisions
  • // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops 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_RoutingConstraint_MaxAllowedHops) 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_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops"], 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_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/risk-diversity-characteristic YANG schema element.
    type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic struct {
    	RiskCharacteristicName	*string	`path:"risk-characteristic-name" module:"tapi-connectivity"`
    	RiskIdentifierList	[]string	`path:"risk-identifier-list" module:"tapi-connectivity"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic 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_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.RiskCharacteristicName == nil {
    		return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"risk-characteristic-name": *t.RiskCharacteristicName,
    
    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_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic"], 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_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    
    // TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/topology-constraint YANG schema element.
    type TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct {
    	AvoidTopology	*string	`path:"avoid-topology" module:"tapi-connectivity"`
    	ConstraintWeight	*uint64	`path:"constraint-weight" module:"tapi-connectivity"`
    	ExcludeLink	*string	`path:"exclude-link" module:"tapi-connectivity"`
    	ExcludeNode	*string	`path:"exclude-node" module:"tapi-connectivity"`
    	ExcludeNodeEdgePoint	*string	`path:"exclude-node-edge-point" module:"tapi-connectivity"`
    	ExcludePath	*string	`path:"exclude-path" module:"tapi-connectivity"`
    	IncludeLink	*string	`path:"include-link" module:"tapi-connectivity"`
    	IncludeNode	*string	`path:"include-node" module:"tapi-connectivity"`
    	IncludeNodeEdgePoint	*string	`path:"include-node-edge-point" module:"tapi-connectivity"`
    	IncludePath	*string	`path:"include-path" module:"tapi-connectivity"`
    	IncludeTopology	*string	`path:"include-topology" module:"tapi-connectivity"`
    	LocalId	*string	`path:"local-id" module:"tapi-connectivity"`
    	Name	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name	`path:"name" module:"tapi-connectivity"`
    	PreferredTransportLayer	E_TapiPathComputation_LayerProtocolName	`path:"preferred-transport-layer" module:"tapi-connectivity"`
    }
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint implements the yang.GoStruct
    // interface. This allows functions that need to handle this struct to
    // identify it as being generated by ygen.
    func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // NewName creates a new entry in the Name list of the
    // TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name, error){
    
    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_TopologyConstraint_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)
    	}
    
    	t.Name[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name{
    		ValueName: &ValueName,
    	}
    
    	return t.Name[key], nil
    }
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct, which is a YANG list entry.
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.LocalId == nil {
    		return nil, fmt.Errorf("nil value for key LocalId")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"local-id": *t.LocalId,
    
    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_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint"], 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_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/topology-constraint/name YANG schema element.
    type TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name struct {
    	Value	*string	`path:"value" module:"tapi-connectivity"`
    	ValueName	*string	`path:"value-name" module:"tapi-connectivity"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name 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_TopologyConstraint_Name) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name struct, which is a YANG list entry.
    func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.ValueName == nil {
    		return nil, fmt.Errorf("nil value for key ValueName")
    
    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_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_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_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_Name represents the /tapi-common/context/name YANG schema element.
    type TapiCommon_Context_Name struct {
    	Value	*string	`path:"value" module:"tapi-common"`
    	ValueName	*string	`path:"value-name" module:"tapi-common"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_Name 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_Name) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_Name struct, which is a YANG list entry.
    func (t *TapiCommon_Context_Name) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.ValueName == nil {
    		return nil, fmt.Errorf("nil value for key ValueName")
    
    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_Name) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_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_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext represents the /tapi-common/context/path-computation-context YANG schema element.
    type TapiCommon_Context_PathComputationContext struct {
    	Path	map[string]*TapiCommon_Context_PathComputationContext_Path	`path:"path" module:"tapi-path-computation"`
    	PathCompService	map[string]*TapiCommon_Context_PathComputationContext_PathCompService	`path:"path-comp-service" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext 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_PathComputationContext) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // NewPath creates a new entry in the Path list of the
    // TapiCommon_Context_PathComputationContext struct. The keys of the list are populated from the input
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_PathComputationContext) NewPath(Uuid string) (*TapiCommon_Context_PathComputationContext_Path, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    
    	if t.Path == nil {
    		t.Path = make(map[string]*TapiCommon_Context_PathComputationContext_Path)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := Uuid
    
    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.Path[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list Path", key)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.Path[key] = &TapiCommon_Context_PathComputationContext_Path{
    		Uuid: &Uuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.Path[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // NewPathCompService creates a new entry in the PathCompService list of the
    // TapiCommon_Context_PathComputationContext struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext) NewPathCompService(Uuid string) (*TapiCommon_Context_PathComputationContext_PathCompService, error){
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    	if t.PathCompService == nil {
    		t.PathCompService = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := Uuid
    
    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.PathCompService[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list PathCompService", key)
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	t.PathCompService[key] = &TapiCommon_Context_PathComputationContext_PathCompService{
    		Uuid: &Uuid,
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	return t.PathCompService[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext"], t, opts...); err != nil {
    
    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_PathComputationContext) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_Path represents the /tapi-common/context/path-computation-context/path YANG schema element.
    type TapiCommon_Context_PathComputationContext_Path struct {
    	Direction	E_TapiPathComputation_ForwardingDirection	`path:"direction" module:"tapi-path-computation"`
    	LayerProtocolName	E_TapiPathComputation_LayerProtocolName	`path:"layer-protocol-name" module:"tapi-path-computation"`
    	Link	map[TapiCommon_Context_PathComputationContext_Path_Link_Key]*TapiCommon_Context_PathComputationContext_Path_Link	`path:"link" module:"tapi-path-computation"`
    	Name	map[string]*TapiCommon_Context_PathComputationContext_Path_Name	`path:"name" module:"tapi-path-computation"`
    	RoutingConstraint	*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint	`path:"routing-constraint" module:"tapi-path-computation"`
    	Uuid	*string	`path:"uuid" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path 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_PathComputationContext_Path) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // TapiCommon_Context_PathComputationContext_Path_Link_Key represents the key for list Link of element /tapi-common/context/path-computation-context/path.
    type TapiCommon_Context_PathComputationContext_Path_Link_Key struct {
    	TopologyUuid	string	`path:"topology-uuid"`
    	LinkUuid	string	`path:"link-uuid"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // NewLink creates a new entry in the Link list of the
    // TapiCommon_Context_PathComputationContext_Path struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_Path) NewLink(TopologyUuid string, LinkUuid string) (*TapiCommon_Context_PathComputationContext_Path_Link, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    	if t.Link == nil {
    		t.Link = make(map[TapiCommon_Context_PathComputationContext_Path_Link_Key]*TapiCommon_Context_PathComputationContext_Path_Link)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := TapiCommon_Context_PathComputationContext_Path_Link_Key{
    		TopologyUuid: TopologyUuid,
    		LinkUuid: LinkUuid,
    
    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.Link[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list Link", key)
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	t.Link[key] = &TapiCommon_Context_PathComputationContext_Path_Link{
    		TopologyUuid: &TopologyUuid,
    		LinkUuid: &LinkUuid,
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	return t.Link[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // NewName creates a new entry in the Name list of the
    // TapiCommon_Context_PathComputationContext_Path struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_Path) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_Path_Name, error){
    
    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_PathComputationContext_Path_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_PathComputationContext_Path_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_PathComputationContext_Path struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_Path) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.Uuid == nil {
    		return nil, fmt.Errorf("nil value for key Uuid")
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	return map[string]interface{}{
    		"uuid": *t.Uuid,
    	}, nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_Path) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path"], t, opts...); err != nil {
    
    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_PathComputationContext_Path) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService represents the /tapi-common/context/path-computation-context/path-comp-service YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService struct {
    	Direction	E_TapiPathComputation_ForwardingDirection	`path:"direction" module:"tapi-path-computation"`
    	EndPoint	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint	`path:"end-point" module:"tapi-path-computation"`
    	LayerProtocolName	E_TapiPathComputation_LayerProtocolName	`path:"layer-protocol-name" module:"tapi-path-computation"`
    	Name	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Name	`path:"name" module:"tapi-path-computation"`
    	ObjectiveFunction	*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction	`path:"objective-function" module:"tapi-path-computation"`
    	OptimizationConstraint	*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint	`path:"optimization-constraint" module:"tapi-path-computation"`
    	Path	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Path	`path:"path" module:"tapi-path-computation"`
    	RoutingConstraint	*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint	`path:"routing-constraint" module:"tapi-path-computation"`
    	TopologyConstraint	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint	`path:"topology-constraint" module:"tapi-path-computation"`
    	Uuid	*string	`path:"uuid" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService 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_PathComputationContext_PathCompService) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // NewEndPoint creates a new entry in the EndPoint list of the
    // TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewEndPoint(LocalId string) (*TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_Name{
    		ValueName: &ValueName,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.Name[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // NewPath creates a new entry in the Path list of the
    // TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewPath(PathUuid string) (*TapiCommon_Context_PathComputationContext_PathCompService_Path, error){
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    
    	if t.Path == nil {
    		t.Path = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Path)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := PathUuid
    
    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.Path[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list Path", key)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.Path[key] = &TapiCommon_Context_PathComputationContext_PathCompService_Path{
    		PathUuid: &PathUuid,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	return t.Path[key], nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // NewTopologyConstraint creates a new entry in the TopologyConstraint list of the
    // TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // arguments.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewTopologyConstraint(LocalId string) (*TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService) Λ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_PathComputationContext_PathCompService) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService"], 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_PathComputationContext_PathCompService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_EndPoint represents the /tapi-common/context/path-computation-context/path-comp-service/end-point YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct {
    	Capacity	*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity	`path:"capacity" module:"tapi-path-computation"`
    	Direction	E_TapiPathComputation_PortDirection	`path:"direction" module:"tapi-path-computation"`
    	LayerProtocolName	E_TapiPathComputation_LayerProtocolName	`path:"layer-protocol-name" module:"tapi-path-computation"`
    	LayerProtocolQualifier	E_TapiPathComputation_LayerProtocolQualifier	`path:"layer-protocol-qualifier" module:"tapi-path-computation"`
    	LocalId	*string	`path:"local-id" module:"tapi-path-computation"`
    	Name	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name	`path:"name" module:"tapi-path-computation"`
    	Role	E_TapiPathComputation_PortRole	`path:"role" module:"tapi-path-computation"`
    	ServiceInterfacePoint	*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint	`path:"service-interface-point" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_EndPoint) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // NewName creates a new entry in the Name list of the
    // TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name, error){
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    	if t.Name == nil {
    		t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	key := ValueName
    
    	// Ensure that this key has not already been used in the
    	// list. Keyed YANG lists do not allow duplicate keys to
    	// be created.
    	if _, ok := t.Name[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list Name", key)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    
    	t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name{
    		ValueName: &ValueName,
    	}
    
    	return t.Name[key], nil
    }
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.LocalId == nil {
    		return nil, fmt.Errorf("nil value for key LocalId")
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}
    
    	return map[string]interface{}{
    
    		"local-id": *t.LocalId,
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	}, nil
    }
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_EndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/capacity YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity struct {
    	TotalSize	*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize	`path:"total-size" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity 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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_EndPoint_Capacity) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity"], 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_PathComputationContext_PathCompService_EndPoint_Capacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/capacity/total-size YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize struct {
    	Unit	E_TapiCommon_CapacityUnit	`path:"unit" module:"tapi-path-computation"`
    	Value	*uint64	`path:"value" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/name YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name struct {
    	Value	*string	`path:"value" module:"tapi-path-computation"`
    	ValueName	*string	`path:"value-name" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name 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_PathComputationContext_PathCompService_EndPoint_Name) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.ValueName == nil {
    		return nil, fmt.Errorf("nil value for key ValueName")
    	}
    
    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_PathComputationContext_PathCompService_EndPoint_Name) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_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_PathComputationContext_PathCompService_EndPoint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/service-interface-point YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint struct {
    	ServiceInterfacePointUuid	*string	`path:"service-interface-point-uuid" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint"], 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_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_Name represents the /tapi-common/context/path-computation-context/path-comp-service/name YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_Name struct {
    	Value	*string	`path:"value" module:"tapi-path-computation"`
    	ValueName	*string	`path:"value-name" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_Name 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_PathComputationContext_PathCompService_Name) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_Name struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) ΛListKeyMap() (map[string]interface{}, error) {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	if t.ValueName == nil {
    		return nil, fmt.Errorf("nil value for key ValueName")
    	}
    
    	return map[string]interface{}{
    		"value-name": *t.ValueName,
    	}, nil
    }
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_Name"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction represents the /tapi-common/context/path-computation-context/path-comp-service/objective-function YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction struct {
    	BandwidthOptimization	E_TapiPathComputation_DirectiveValue	`path:"bandwidth-optimization" module:"tapi-path-computation"`
    	ConcurrentPaths	E_TapiPathComputation_DirectiveValue	`path:"concurrent-paths" module:"tapi-path-computation"`
    	CostOptimization	E_TapiPathComputation_DirectiveValue	`path:"cost-optimization" module:"tapi-path-computation"`
    	LinkUtilization	E_TapiPathComputation_DirectiveValue	`path:"link-utilization" module:"tapi-path-computation"`
    	LocalId	*string	`path:"local-id" module:"tapi-path-computation"`
    	Name	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name	`path:"name" module:"tapi-path-computation"`
    	ResourceSharing	E_TapiPathComputation_DirectiveValue	`path:"resource-sharing" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction 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_PathComputationContext_PathCompService_ObjectiveFunction) IsYANGGoStruct() {}
    
    // NewName creates a new entry in the Name list of the
    // TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name, error){
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    	if t.Name == nil {
    		t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name)
    	}
    
    	key := ValueName
    
    	// Ensure that this key has not already been used in the
    	// list. Keyed YANG lists do not allow duplicate keys to
    	// be created.
    	if _, ok := t.Name[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list Name", key)
    	}
    
    	t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name{
    		ValueName: &ValueName,
    	}
    
    	return t.Name[key], nil
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_ObjectiveFunction) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name represents the /tapi-common/context/path-computation-context/path-comp-service/objective-function/name YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name struct {
    	Value	*string	`path:"value" module:"tapi-path-computation"`
    	ValueName	*string	`path:"value-name" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name 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_PathComputationContext_PathCompService_ObjectiveFunction_Name) IsYANGGoStruct() {}
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.ValueName == nil {
    		return nil, fmt.Errorf("nil value for key ValueName")
    	}
    
    	return map[string]interface{}{
    		"value-name": *t.ValueName,
    	}, nil
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_ObjectiveFunction_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/optimization-constraint YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint struct {
    	LocalId	*string	`path:"local-id" module:"tapi-path-computation"`
    	Name	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name	`path:"name" module:"tapi-path-computation"`
    	TrafficInterruption	E_TapiPathComputation_DirectiveValue	`path:"traffic-interruption" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint 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_PathComputationContext_PathCompService_OptimizationConstraint) IsYANGGoStruct() {}
    
    // NewName creates a new entry in the Name list of the
    // TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name, error){
    
    	// Initialise the list within the receiver struct if it has not already been
    	// created.
    	if t.Name == nil {
    		t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name)
    	}
    
    	key := ValueName
    
    	// Ensure that this key has not already been used in the
    	// list. Keyed YANG lists do not allow duplicate keys to
    	// be created.
    	if _, ok := t.Name[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list Name", key)
    	}
    
    	t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name{
    		ValueName: &ValueName,
    	}
    
    	return t.Name[key], nil
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_OptimizationConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/optimization-constraint/name YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name struct {
    	Value	*string	`path:"value" module:"tapi-path-computation"`
    	ValueName	*string	`path:"value-name" module:"tapi-path-computation"`
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name 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_PathComputationContext_PathCompService_OptimizationConstraint_Name) IsYANGGoStruct() {}
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.ValueName == nil {
    		return nil, fmt.Errorf("nil value for key ValueName")
    	}
    
    	return map[string]interface{}{
    		"value-name": *t.ValueName,
    	}, nil
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    // Validate validates s against the YANG schema corresponding to its type.
    
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name"], t, opts...); err != nil {
    
    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_PathComputationContext_PathCompService_OptimizationConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_Path represents the /tapi-common/context/path-computation-context/path-comp-service/path YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_Path struct {
    	PathUuid	*string	`path:"path-uuid" module:"tapi-path-computation"`
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_Path implements the yang.GoStruct
    // interface. This allows functions that need to handle this struct to
    // identify it as being generated by ygen.
    func (*TapiCommon_Context_PathComputationContext_PathCompService_Path) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_Path struct, which is a YANG list entry.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) ΛListKeyMap() (map[string]interface{}, error) {
    	if t.PathUuid == nil {
    		return nil, fmt.Errorf("nil value for key PathUuid")
    	}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    	return map[string]interface{}{
    		"path-uuid": *t.PathUuid,
    	}, nil
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    
    // Validate validates s against the YANG schema corresponding to its type.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) Validate(opts ...ygot.ValidationOption) error {
    	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_Path"], t, opts...); err != nil {
    		return err
    	}
    	return nil
    }
    
    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_PathComputationContext_PathCompService_Path) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    
    // TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint YANG schema element.
    type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct {
    	CostCharacteristic	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic	`path:"cost-characteristic" module:"tapi-path-computation"`
    	DiversityPolicy	E_TapiPathComputation_DiversityPolicy	`path:"diversity-policy" module:"tapi-path-computation"`
    	IsExclusive	*bool	`path:"is-exclusive" module:"tapi-path-computation"`
    	LatencyCharacteristic	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic	`path:"latency-characteristic" module:"tapi-path-computation"`
    	MaxAllowedCost	*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost	`path:"max-allowed-cost" module:"tapi-path-computation"`
    	MaxAllowedDelay	*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay	`path:"max-allowed-delay" module:"tapi-path-computation"`
    	MaxAllowedHops	*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops	`path:"max-allowed-hops" module:"tapi-path-computation"`
    	RiskDiversityCharacteristic	map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic	`path:"risk-diversity-characteristic" module:"tapi-path-computation"`
    	RouteObjectiveFunction	E_TapiPathComputation_RouteObjectiveFunction	`path:"route-objective-function" module:"tapi-path-computation"`
    	TolerableImpact	E_TapiPathComputation_GradesOfImpact	`path:"tolerable-impact" module:"tapi-path-computation"`
    }
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint implements the yang.GoStruct
    // interface. This allows functions that need to handle this struct to
    // identify it as being generated by ygen.
    func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) IsYANGGoStruct() {}
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    
    
    // NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
    // TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic, error){
    
    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_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic)
    	}
    
    	key := CostName
    
    	// Ensure that this key has not already been used in the
    	// list. Keyed YANG lists do not allow duplicate keys to
    	// be created.
    	if _, ok := t.CostCharacteristic[key]; ok {
    		return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
    	}
    
    	t.CostCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic{
    		CostName: &CostName,
    	}
    
    	return t.CostCharacteristic[key], nil
    }
    
    // NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
    // TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
    // arguments.
    func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic, error){