Skip to content
Snippets Groups Projects
yang.go 1.05 MiB
Newer Older
Manuel Kieweg's avatar
Manuel Kieweg committed
/*
Package tapi is a generated package which contains definitions
of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was false
in this case).

Manuel Kieweg's avatar
Manuel Kieweg committed
This package was generated by /Users/mk/go/pkg/mod/github.com/openconfig/ygot@v0.10.0/genutil/names.go
Manuel Kieweg's avatar
Manuel Kieweg committed
using the following YANG input files:
Manuel Kieweg's avatar
Manuel Kieweg committed
	- ../../models/tapi/tapi-topology@2019-03-31.yang
	- ../../models/tapi/tapi-connectivity@2019-03-31.yang
	- ../../models/tapi/tapi-common@2019-03-31.yang
	- ../../models/tapi/tapi-photonic-media@2019-03-31.yang
Manuel Kieweg's avatar
Manuel Kieweg committed
Imported modules were sourced from:
	- ../../yang/...
*/
package tapi

import (
	"encoding/json"
	"fmt"
	"reflect"

	"github.com/openconfig/ygot/ygot"
	"github.com/openconfig/goyang/pkg/yang"
	"github.com/openconfig/ygot/ytypes"
)

// Binary is a type that is used for fields that have a YANG type of
// binary. It is used such that binary fields can be distinguished from
// leaf-lists of uint8s (which are mapped to []uint8, equivalent to
// []byte in reflection).
type Binary []byte

// YANGEmpty is a type that is used for fields that have a YANG type of
// empty. It is used such that empty fields can be distinguished from boolean fields
// in the generated code.
type YANGEmpty bool

var (
	SchemaTree map[string]*yang.Entry
)

func init() {
	var err error
	if SchemaTree, err = UnzipSchema(); err != nil {
		panic("schema error: " +  err.Error())
	}
}

// Schema returns the details of the generated schema.
func Schema() (*ytypes.Schema, error) {
	uzp, err := UnzipSchema()
	if err != nil {
		return nil, fmt.Errorf("cannot unzip schema, %v", err)
	}

	return &ytypes.Schema{
		Root: &Device{},
		SchemaTree: uzp,
		Unmarshal: Unmarshal,
	}, nil
}

// UnzipSchema unzips the zipped schema and returns a map of yang.Entry nodes,
// keyed by the name of the struct that the yang.Entry describes the schema for.
func UnzipSchema() (map[string]*yang.Entry, error) {
	var schemaTree map[string]*yang.Entry
	var err error
	if schemaTree, err = ygot.GzipToSchema(ySchema); err != nil {
		return nil, fmt.Errorf("could not unzip the schema; %v", err)
	}
	return schemaTree, nil
}

// Unmarshal unmarshals data, which must be RFC7951 JSON format, into
// destStruct, which must be non-nil and the correct GoStruct type. It returns
// an error if the destStruct is not found in the schema or the data cannot be
// unmarshaled. The supplied options (opts) are used to control the behaviour
// of the unmarshal function - for example, determining whether errors are
// thrown for unknown fields in the input JSON.
func Unmarshal(data []byte, destStruct ygot.GoStruct, opts ...ytypes.UnmarshalOpt) error {
	tn := reflect.TypeOf(destStruct).Elem().Name()
	schema, ok := SchemaTree[tn]
	if !ok {
		return fmt.Errorf("could not find schema for type %s", tn )
	}
	var jsonTree interface{}
	if err := json.Unmarshal([]byte(data), &jsonTree); err != nil {
		return err
	}
	return ytypes.Unmarshal(schema, destStruct, jsonTree, opts...)
}

// Device represents the /device YANG schema element.
type Device struct {
	Context	*TapiCommon_Context	`path:"context" module:"tapi-common"`
}

// IsYANGGoStruct ensures that Device implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*Device) IsYANGGoStruct() {}

// Validate validates s against the YANG schema corresponding to its type.
func (t *Device) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["Device"], 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 *Device) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context represents the /tapi-common/context YANG schema element.
type TapiCommon_Context struct {
	ConnectivityContext	*TapiCommon_Context_ConnectivityContext	`path:"connectivity-context" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
	Name	map[string]*TapiCommon_Context_Name	`path:"name" module:"tapi-common"`
	PathComputationContext	*TapiCommon_Context_PathComputationContext	`path:"path-computation-context" module:"tapi-path-computation"`
Manuel Kieweg's avatar
Manuel Kieweg committed
	ServiceInterfacePoint	map[string]*TapiCommon_Context_ServiceInterfacePoint	`path:"service-interface-point" module:"tapi-common"`
	TopologyContext	*TapiCommon_Context_TopologyContext	`path:"topology-context" module:"tapi-topology"`
	Uuid	*string	`path:"uuid" module:"tapi-common"`
}

// IsYANGGoStruct ensures that TapiCommon_Context 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) IsYANGGoStruct() {}

// NewName creates a new entry in the Name list of the
// TapiCommon_Context struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context) NewName(ValueName string) (*TapiCommon_Context_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_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_Name{
		ValueName: &ValueName,
	}

	return t.Name[key], nil
}

// NewServiceInterfacePoint creates a new entry in the ServiceInterfacePoint list of the
// TapiCommon_Context struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context) NewServiceInterfacePoint(Uuid string) (*TapiCommon_Context_ServiceInterfacePoint, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.ServiceInterfacePoint == nil {
		t.ServiceInterfacePoint = make(map[string]*TapiCommon_Context_ServiceInterfacePoint)
	}

	key := Uuid

	// 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.ServiceInterfacePoint[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list ServiceInterfacePoint", key)
	}

	t.ServiceInterfacePoint[key] = &TapiCommon_Context_ServiceInterfacePoint{
		Uuid: &Uuid,
	}

	return t.ServiceInterfacePoint[key], nil
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context"], 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) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext represents the /tapi-common/context/connectivity-context YANG schema element.
type TapiCommon_Context_ConnectivityContext struct {
	Connection	map[string]*TapiCommon_Context_ConnectivityContext_Connection	`path:"connection" module:"tapi-connectivity"`
	ConnectivityService	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService	`path:"connectivity-service" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext 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) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// NewConnection creates a new entry in the Connection list of the
// TapiCommon_Context_ConnectivityContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext) NewConnection(Uuid string) (*TapiCommon_Context_ConnectivityContext_Connection, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.Connection == nil {
		t.Connection = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := Uuid

	// 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.Connection[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list Connection", key)
	}

	t.Connection[key] = &TapiCommon_Context_ConnectivityContext_Connection{
		Uuid: &Uuid,
	}

	return t.Connection[key], nil
}

// NewConnectivityService creates a new entry in the ConnectivityService list of the
// TapiCommon_Context_ConnectivityContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext) NewConnectivityService(Uuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.ConnectivityService == nil {
		t.ConnectivityService = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService)
	}

	key := Uuid

	// Ensure that this key has not already been used in the
	// list. Keyed YANG lists do not allow duplicate keys to
	// be created.
	if _, ok := t.ConnectivityService[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list ConnectivityService", key)
	}

	t.ConnectivityService[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService{
		Uuid: &Uuid,
	}

	return t.ConnectivityService[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) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext"], 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) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection represents the /tapi-common/context/connectivity-context/connection YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection struct {
	BoundingNode	*TapiCommon_Context_ConnectivityContext_Connection_BoundingNode	`path:"bounding-node" module:"tapi-connectivity"`
	ConnectionEndPoint	map[TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint	`path:"connection-end-point" module:"tapi-connectivity"`
	Direction	E_TapiConnectivity_ForwardingDirection	`path:"direction" module:"tapi-connectivity"`
	LayerProtocolName	E_TapiConnectivity_LayerProtocolName	`path:"layer-protocol-name" module:"tapi-connectivity"`
	LifecycleState	E_TapiCommon_LifecycleState	`path:"lifecycle-state" module:"tapi-connectivity"`
	LowerConnection	map[string]*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection	`path:"lower-connection" module:"tapi-connectivity"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_Connection_Name	`path:"name" module:"tapi-connectivity"`
	OperationalState	E_TapiCommon_OperationalState	`path:"operational-state" module:"tapi-connectivity"`
	Route	map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route	`path:"route" module:"tapi-connectivity"`
	SupportedClientLink	map[TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key]*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink	`path:"supported-client-link" module:"tapi-connectivity"`
	SwitchControl	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl	`path:"switch-control" module:"tapi-connectivity"`
	Uuid	*string	`path:"uuid" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key represents the key for list ConnectionEndPoint of element /tapi-common/context/connectivity-context/connection.
type TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key struct {
	TopologyUuid	string	`path:"topology-uuid"`
	NodeUuid	string	`path:"node-uuid"`
	NodeEdgePointUuid	string	`path:"node-edge-point-uuid"`
	ConnectionEndPointUuid	string	`path:"connection-end-point-uuid"`
}
Manuel Kieweg's avatar
Manuel Kieweg committed

// TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key represents the key for list SupportedClientLink of element /tapi-common/context/connectivity-context/connection.
type TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key struct {
	TopologyUuid	string	`path:"topology-uuid"`
	LinkUuid	string	`path:"link-uuid"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewConnectionEndPoint creates a new entry in the ConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.ConnectionEndPoint == nil {
		t.ConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint)
	}

	key := TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key{
		TopologyUuid: TopologyUuid,
		NodeUuid: NodeUuid,
		NodeEdgePointUuid: NodeEdgePointUuid,
		ConnectionEndPointUuid: ConnectionEndPointUuid,
	}

	// Ensure that this key has not already been used in the
	// list. Keyed YANG lists do not allow duplicate keys to
	// be created.
	if _, ok := t.ConnectionEndPoint[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list ConnectionEndPoint", key)
	}

	t.ConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint{
		TopologyUuid: &TopologyUuid,
		NodeUuid: &NodeUuid,
		NodeEdgePointUuid: &NodeEdgePointUuid,
		ConnectionEndPointUuid: &ConnectionEndPointUuid,
	}

	return t.ConnectionEndPoint[key], nil
}

// NewLowerConnection creates a new entry in the LowerConnection list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewLowerConnection(ConnectionUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.LowerConnection == nil {
		t.LowerConnection = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection)
	}

	key := ConnectionUuid

	// 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.LowerConnection[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list LowerConnection", key)
	}

	t.LowerConnection[key] = &TapiCommon_Context_ConnectivityContext_Connection_LowerConnection{
		ConnectionUuid: &ConnectionUuid,
	}

	return t.LowerConnection[key], nil
}
Manuel Kieweg's avatar
Manuel Kieweg committed

// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_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_Connection_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)
	}

	t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_Name{
Manuel Kieweg's avatar
Manuel Kieweg committed
		ValueName: &ValueName,
	}

	return t.Name[key], nil
}

// NewRoute creates a new entry in the Route list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewRoute(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_Route, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.Route == nil {
		t.Route = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route)
	}

	key := LocalId

	// 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.Route[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list Route", key)
	}

	t.Route[key] = &TapiCommon_Context_ConnectivityContext_Connection_Route{
		LocalId: &LocalId,
	}

	return t.Route[key], nil
}

// NewSupportedClientLink creates a new entry in the SupportedClientLink list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewSupportedClientLink(TopologyUuid string, LinkUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.SupportedClientLink == nil {
		t.SupportedClientLink = make(map[TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key]*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink)
	}

	key := TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key{
		TopologyUuid: TopologyUuid,
		LinkUuid: LinkUuid,
	}

	// Ensure that this key has not already been used in the
	// list. Keyed YANG lists do not allow duplicate keys to
	// be created.
	if _, ok := t.SupportedClientLink[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list SupportedClientLink", key)
	}

	t.SupportedClientLink[key] = &TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink{
		TopologyUuid: &TopologyUuid,
		LinkUuid: &LinkUuid,
	}

	return t.SupportedClientLink[key], nil
}

// NewSwitchControl creates a new entry in the SwitchControl list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewSwitchControl(Uuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.SwitchControl == nil {
		t.SwitchControl = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl)
	}

	key := Uuid

	// 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.SwitchControl[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list SwitchControl", key)
	}

	t.SwitchControl[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl{
		Uuid: &Uuid,
	}

	return t.SwitchControl[key], nil
}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection) Λ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_Connection) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_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_Connection) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_BoundingNode represents the /tapi-common/context/connectivity-context/connection/bounding-node YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_BoundingNode struct {
	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_Connection_BoundingNode 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_Connection_BoundingNode) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_BoundingNode) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_BoundingNode"], 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_Connection_BoundingNode) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_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_Connection_ConnectionEndPoint 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_Connection_ConnectionEndPoint) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
	if t.ConnectionEndPointUuid == nil {
		return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
	}

	if t.NodeEdgePointUuid == nil {
		return nil, fmt.Errorf("nil value for key NodeEdgePointUuid")
	}

	if t.NodeUuid == nil {
		return nil, fmt.Errorf("nil value for key NodeUuid")
	}

	if t.TopologyUuid == nil {
		return nil, fmt.Errorf("nil value for key TopologyUuid")
	}

	return map[string]interface{}{
		"connection-end-point-uuid": *t.ConnectionEndPointUuid,
		"node-edge-point-uuid": *t.NodeEdgePointUuid,
		"node-uuid": *t.NodeUuid,
		"topology-uuid": *t.TopologyUuid,
	}, nil
}
Manuel Kieweg's avatar
Manuel Kieweg committed

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint"], 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_Connection_ConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_LowerConnection represents the /tapi-common/context/connectivity-context/connection/lower-connection YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_LowerConnection struct {
	ConnectionUuid	*string	`path:"connection-uuid" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_LowerConnection 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_Connection_LowerConnection) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_LowerConnection struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_LowerConnection) Λ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_Connection_LowerConnection) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_LowerConnection"], 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_Connection_LowerConnection) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_Name represents the /tapi-common/context/connectivity-context/connection/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_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_Connection_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_Connection_Name) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_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_ConnectivityContext_Connection_Name) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_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_Connection_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_Route represents the /tapi-common/context/connectivity-context/connection/route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route struct {
	ConnectionEndPoint	map[TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint	`path:"connection-end-point" module:"tapi-connectivity"`
	LocalId	*string	`path:"local-id" module:"tapi-connectivity"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route_Name	`path:"name" module:"tapi-connectivity"`
	ResilienceRoute	*TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute	`path:"resilience-route" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route 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_Connection_Route) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key represents the key for list ConnectionEndPoint of element /tapi-common/context/connectivity-context/connection/route.
type TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key struct {
	TopologyUuid	string	`path:"topology-uuid"`
	NodeUuid	string	`path:"node-uuid"`
	NodeEdgePointUuid	string	`path:"node-edge-point-uuid"`
	ConnectionEndPointUuid	string	`path:"connection-end-point-uuid"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewConnectionEndPoint creates a new entry in the ConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection_Route struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_Route_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_Connection_Route_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key{
		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_Connection_Route_ConnectionEndPoint{
		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_Connection_Route struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_Route_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_Connection_Route_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)
	}

	t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_Route_Name{
Manuel Kieweg's avatar
Manuel Kieweg committed
		ValueName: &ValueName,
	}

	return t.Name[key], nil
}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Route struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) Λ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
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route"], 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_Connection_Route) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/route/connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint struct {
	ConnectionEndPointUuid	*string	`path:"connection-end-point-uuid" module:"tapi-connectivity"`
	NodeEdgePointUuid	*string	`path:"node-edge-point-uuid" module:"tapi-connectivity"`
	NodeUuid	*string	`path:"node-uuid" module:"tapi-connectivity"`
	TopologyUuid	*string	`path:"topology-uuid" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route_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_Connection_Route_ConnectionEndPoint) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_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")
	}

	if t.TopologyUuid == nil {
		return nil, fmt.Errorf("nil value for key TopologyUuid")
	}

	return map[string]interface{}{
		"connection-end-point-uuid": *t.ConnectionEndPointUuid,
		"node-edge-point-uuid": *t.NodeEdgePointUuid,
		"node-uuid": *t.NodeUuid,
		"topology-uuid": *t.TopologyUuid,
	}, nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint"], 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_Connection_Route_ConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_Route_Name represents the /tapi-common/context/connectivity-context/connection/route/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route_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_Connection_Route_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_Connection_Route_Name) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Route_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_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_ConnectivityContext_Connection_Route_Name) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route_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_Connection_Route_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute represents the /tapi-common/context/connectivity-context/connection/route/resilience-route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute struct {
	Priority	*uint64	`path:"priority" module:"tapi-connectivity"`
	RouteState	E_TapiConnectivity_RouteState	`path:"route-state" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute 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_Connection_Route_ResilienceRoute) IsYANGGoStruct() {}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute"], 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_Connection_Route_ResilienceRoute) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink represents the /tapi-common/context/connectivity-context/connection/supported-client-link YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink struct {
	LinkUuid	*string	`path:"link-uuid" module:"tapi-connectivity"`
	TopologyUuid	*string	`path:"topology-uuid" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink 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_Connection_SupportedClientLink) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink) ΛListKeyMap() (map[string]interface{}, error) {
	if t.LinkUuid == nil {
		return nil, fmt.Errorf("nil value for key LinkUuid")
	}
Manuel Kieweg's avatar
Manuel Kieweg committed

	if t.TopologyUuid == nil {
		return nil, fmt.Errorf("nil value for key TopologyUuid")
	}

	return map[string]interface{}{
		"link-uuid": *t.LinkUuid,
Manuel Kieweg's avatar
Manuel Kieweg committed
		"topology-uuid": *t.TopologyUuid,
	}, nil
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink"], 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_Connection_SupportedClientLink) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl represents the /tapi-common/context/connectivity-context/connection/switch-control YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl 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"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name	`path:"name" module:"tapi-connectivity"`
	PreferredRestorationLayer	[]E_TapiConnectivity_LayerProtocolName	`path:"preferred-restoration-layer" module:"tapi-connectivity"`
	ResilienceType	*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType	`path:"resilience-type" module:"tapi-connectivity"`
	ResiliencyRouteConstraint	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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"`
	SubSwitchControl	map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl	`path:"sub-switch-control" module:"tapi-connectivity"`
	Switch	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch	`path:"switch" module:"tapi-connectivity"`
	Uuid	*string	`path:"uuid" module:"tapi-connectivity"`
	WaitToRevertTime	*uint64	`path:"wait-to-revert-time" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl 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_Connection_SwitchControl) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key represents the key for list SubSwitchControl of element /tapi-common/context/connectivity-context/connection/switch-control.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key struct {
	ConnectionUuid	string	`path:"connection-uuid"`
	SwitchControlUuid	string	`path:"switch-control-uuid"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_Name{
		ValueName: &ValueName,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.Name[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewResiliencyRouteConstraint creates a new entry in the ResiliencyRouteConstraint list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewResiliencyRouteConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint{
		LocalId: &LocalId,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.ResiliencyRouteConstraint[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewSubSwitchControl creates a new entry in the SubSwitchControl list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewSubSwitchControl(ConnectionUuid string, SwitchControlUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.SubSwitchControl == nil {
		t.SubSwitchControl = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key{
		ConnectionUuid: ConnectionUuid,
		SwitchControlUuid: SwitchControlUuid,
	}
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.SubSwitchControl[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list SubSwitchControl", key)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	t.SubSwitchControl[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl{
		ConnectionUuid: &ConnectionUuid,
		SwitchControlUuid: &SwitchControlUuid,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.SubSwitchControl[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewSwitch creates a new entry in the Switch list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
Manuel Kieweg's avatar
Manuel Kieweg committed
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewSwitch(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.Switch == nil {
		t.Switch = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch)
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.Switch[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list Switch", key)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	t.Switch[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch{
		LocalId: &LocalId,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.Switch[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) Λ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_Connection_SwitchControl) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl"], 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_Connection_SwitchControl) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_Name) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_Name) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType represents the /tapi-common/context/connectivity-context/connection/switch-control/resilience-type YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_ResilienceType) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResilienceType) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct {
	LocalId	*string	`path:"local-id" module:"tapi-connectivity"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name	`path:"name" module:"tapi-connectivity"`
	Priority	*uint64	`path:"priority" module:"tapi-connectivity"`
	RoutingConstraint	*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint	`path:"routing-constraint" module:"tapi-connectivity"`
	TopologyConstraint	*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint	`path:"topology-constraint" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint) IsYANGGoStruct() {}

// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) Λ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
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint"], 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_Connection_SwitchControl_ResiliencyRouteConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name struct {
	Value	*string	`path:"value" module:"tapi-connectivity"`
	ValueName	*string	`path:"value-name" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_Name) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct {
	CostCharacteristic	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic	`path:"latency-characteristic" module:"tapi-connectivity"`
	MaxAllowedCost	*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost	`path:"max-allowed-cost" module:"tapi-connectivity"`
	MaxAllowedDelay	*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay	`path:"max-allowed-delay" module:"tapi-connectivity"`
	MaxAllowedHops	*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops	`path:"max-allowed-hops" module:"tapi-connectivity"`
	RiskDiversityCharacteristic	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) IsYANGGoStruct() {}

// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := CostName
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.CostCharacteristic[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	t.CostCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic{
		CostName: &CostName,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.CostCharacteristic[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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.
	if t.LatencyCharacteristic == nil {
		t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := TrafficPropertyName
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.LatencyCharacteristic[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	t.LatencyCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic{
		TrafficPropertyName: &TrafficPropertyName,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.LatencyCharacteristic[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.RiskDiversityCharacteristic == nil {
		t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := RiskCharacteristicName

	// Ensure that this key has not already been used in the
	// list. Keyed YANG lists do not allow duplicate keys to
	// be created.
	if _, ok := t.RiskDiversityCharacteristic[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic{
Manuel Kieweg's avatar
Manuel Kieweg committed
		RiskCharacteristicName: &RiskCharacteristicName,
	}

	return t.RiskDiversityCharacteristic[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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint"], 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct {
	CostAlgorithm	*string	`path:"cost-algorithm" module:"tapi-connectivity"`
	CostName	*string	`path:"cost-name" module:"tapi-connectivity"`
	CostValue	*string	`path:"cost-value" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
	if t.CostName == nil {
		return nil, fmt.Errorf("nil value for key CostName")
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return map[string]interface{}{
		"cost-name": *t.CostName,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}, nil
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic"], 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct {
	FixedLatencyCharacteristic	*string	`path:"fixed-latency-characteristic" module:"tapi-connectivity"`
	JitterCharacteristic	*string	`path:"jitter-characteristic" module:"tapi-connectivity"`
	QueingLatencyCharacteristic	*string	`path:"queing-latency-characteristic" module:"tapi-connectivity"`
	TrafficPropertyName	*string	`path:"traffic-property-name" module:"tapi-connectivity"`
	WanderCharacteristic	*string	`path:"wander-characteristic" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
	if t.TrafficPropertyName == nil {
		return nil, fmt.Errorf("nil value for key TrafficPropertyName")
	}

	return map[string]interface{}{
		"traffic-property-name": *t.TrafficPropertyName,
	}, nil
}
Manuel Kieweg's avatar
Manuel Kieweg committed

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic"], 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost struct {
	Priority	*uint64	`path:"priority" module:"tapi-connectivity"`
	Value	*uint64	`path:"value" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost"], 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay struct {
	Priority	*uint64	`path:"priority" module:"tapi-connectivity"`
	Value	*uint64	`path:"value" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay"], 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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops struct {
	Priority	*uint64	`path:"priority" module:"tapi-connectivity"`
	Value	*uint64	`path:"value" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint struct {
	AvoidTopology	*string	`path:"avoid-topology" module:"tapi-connectivity"`
	ConstraintWeight	*uint64	`path:"constraint-weight" module:"tapi-connectivity"`
	ExcludeLink	*string	`path:"exclude-link" module:"tapi-connectivity"`
	ExcludeNode	*string	`path:"exclude-node" module:"tapi-connectivity"`
	ExcludeNodeEdgePoint	*string	`path:"exclude-node-edge-point" module:"tapi-connectivity"`
	ExcludePath	*string	`path:"exclude-path" module:"tapi-connectivity"`
	IncludeLink	*string	`path:"include-link" module:"tapi-connectivity"`
	IncludeNode	*string	`path:"include-node" module:"tapi-connectivity"`
	IncludeNodeEdgePoint	*string	`path:"include-node-edge-point" module:"tapi-connectivity"`
	IncludePath	*string	`path:"include-path" module:"tapi-connectivity"`
	IncludeTopology	*string	`path:"include-topology" module:"tapi-connectivity"`
	LocalId	*string	`path:"local-id" module:"tapi-connectivity"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name	`path:"name" module:"tapi-connectivity"`
	PreferredTransportLayer	E_TapiPathComputation_LayerProtocolName	`path:"preferred-transport-layer" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint 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_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name, error){

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.Name == nil {
		t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_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_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name{
		ValueName: &ValueName,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	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_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
	if t.ValueName == nil {
		return nil, fmt.Errorf("nil value for key ValueName")
	}

	return map[string]interface{}{
		"value-name": *t.ValueName,
	}, nil
}
Manuel Kieweg's avatar
Manuel Kieweg committed

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl represents the /tapi-common/context/connectivity-context/connection/switch-control/sub-switch-control YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl struct {
	ConnectionUuid	*string	`path:"connection-uuid" module:"tapi-connectivity"`
	SwitchControlUuid	*string	`path:"switch-control-uuid" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl 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_Connection_SwitchControl_SubSwitchControl) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) ΛListKeyMap() (map[string]interface{}, error) {
	if t.ConnectionUuid == nil {
		return nil, fmt.Errorf("nil value for key ConnectionUuid")
	}

	if t.SwitchControlUuid == nil {
		return nil, fmt.Errorf("nil value for key SwitchControlUuid")
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return map[string]interface{}{
		"connection-uuid": *t.ConnectionUuid,
		"switch-control-uuid": *t.SwitchControlUuid,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}, nil
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl"], 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_Connection_SwitchControl_SubSwitchControl) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch represents the /tapi-common/context/connectivity-context/connection/switch-control/switch YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct {
	LocalId	*string	`path:"local-id" module:"tapi-connectivity"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name	`path:"name" module:"tapi-connectivity"`
	SelectedConnectionEndPoint	map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint	`path:"selected-connection-end-point" module:"tapi-connectivity"`
	SelectedRoute	map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute	`path:"selected-route" module:"tapi-connectivity"`
	SelectionReason	E_TapiConnectivity_SelectionReason	`path:"selection-reason" module:"tapi-connectivity"`
	SwitchDirection	E_TapiConnectivity_PortDirection	`path:"switch-direction" module:"tapi-connectivity"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch 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_Connection_SwitchControl_Switch) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key represents the key for list SelectedConnectionEndPoint of element /tapi-common/context/connectivity-context/connection/switch-control/switch.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key struct {
	TopologyUuid	string	`path:"topology-uuid"`
	NodeUuid	string	`path:"node-uuid"`
	NodeEdgePointUuid	string	`path:"node-edge-point-uuid"`
	ConnectionEndPointUuid	string	`path:"connection-end-point-uuid"`
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key represents the key for list SelectedRoute of element /tapi-common/context/connectivity-context/connection/switch-control/switch.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key struct {
	ConnectionUuid	string	`path:"connection-uuid"`
	RouteLocalId	string	`path:"route-local-id"`
}
Manuel Kieweg's avatar
Manuel Kieweg committed

// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_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_Connection_SwitchControl_Switch_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_Connection_SwitchControl_Switch_Name{
		ValueName: &ValueName,
	}

	return t.Name[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewSelectedConnectionEndPoint creates a new entry in the SelectedConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewSelectedConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.SelectedConnectionEndPoint == nil {
		t.SelectedConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint)
	}
Manuel Kieweg's avatar
Manuel Kieweg committed

	key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key{
		TopologyUuid: TopologyUuid,
		NodeUuid: NodeUuid,
		NodeEdgePointUuid: NodeEdgePointUuid,
		ConnectionEndPointUuid: ConnectionEndPointUuid,
	}

	// Ensure that this key has not already been used in the
	// list. Keyed YANG lists do not allow duplicate keys to
	// be created.
	if _, ok := t.SelectedConnectionEndPoint[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list SelectedConnectionEndPoint", key)
	}

	t.SelectedConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint{
		TopologyUuid: &TopologyUuid,
		NodeUuid: &NodeUuid,
		NodeEdgePointUuid: &NodeEdgePointUuid,
		ConnectionEndPointUuid: &ConnectionEndPointUuid,
	}

	return t.SelectedConnectionEndPoint[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewSelectedRoute creates a new entry in the SelectedRoute list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewSelectedRoute(ConnectionUuid string, RouteLocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.SelectedRoute == nil {
		t.SelectedRoute = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute)
	}

	key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key{
		ConnectionUuid: ConnectionUuid,
		RouteLocalId: RouteLocalId,
	}

	// 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.SelectedRoute[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list SelectedRoute", key)
	}

	t.SelectedRoute[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute{
		ConnectionUuid: &ConnectionUuid,
		RouteLocalId: &RouteLocalId,
	}

	return t.SelectedRoute[key], nil
}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) Λ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_Connection_SwitchControl_Switch) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch"], 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_Connection_SwitchControl_Switch) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_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_Connection_SwitchControl_Switch_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_Connection_SwitchControl_Switch_Name) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_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_ConnectivityContext_Connection_SwitchControl_Switch_Name) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_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_Connection_SwitchControl_Switch_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
Manuel Kieweg's avatar
Manuel Kieweg committed


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/selected-connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint 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_Connection_SwitchControl_Switch_SelectedConnectionEndPoint 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_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) IsYANGGoStruct() {}
Manuel Kieweg's avatar
Manuel Kieweg committed

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) Λ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
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint"], 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_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/selected-route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute struct {
	ConnectionUuid	*string	`path:"connection-uuid" module:"tapi-connectivity"`
	RouteLocalId	*string	`path:"route-local-id" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute 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_Connection_SwitchControl_Switch_SelectedRoute) IsYANGGoStruct() {}

// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) Λ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
	}

	if t.RouteLocalId == nil {
		return nil, fmt.Errorf("nil value for key RouteLocalId")
	}

	return map[string]interface{}{
		"connection-uuid": *t.ConnectionUuid,
		"route-local-id": *t.RouteLocalId,
	}, nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) Validate(opts ...ygot.ValidationOption) error {
	if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute"], 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_Connection_SwitchControl_Switch_SelectedRoute) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }


// TapiCommon_Context_ConnectivityContext_ConnectivityService represents the /tapi-common/context/connectivity-context/connectivity-service YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService struct {
	AdministrativeState	E_TapiCommon_AdministrativeState	`path:"administrative-state" module:"tapi-connectivity"`
	Connection	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection	`path:"connection" module:"tapi-connectivity"`
	ConnectivityConstraint	*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint	`path:"connectivity-constraint" module:"tapi-connectivity"`
	ConnectivityService	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService	`path:"connectivity-service" module:"tapi-connectivity"`
	Direction	E_TapiConnectivity_ForwardingDirection	`path:"direction" module:"tapi-connectivity"`
	EndPoint	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint	`path:"end-point" module:"tapi-connectivity"`
	LifecycleState	E_TapiCommon_LifecycleState	`path:"lifecycle-state" module:"tapi-connectivity"`
	Name	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Name	`path:"name" module:"tapi-connectivity"`
	OperationalState	E_TapiCommon_OperationalState	`path:"operational-state" module:"tapi-connectivity"`
	ResilienceConstraint	*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint	`path:"resilience-constraint" module:"tapi-connectivity"`
	RoutingConstraint	*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint	`path:"routing-constraint" module:"tapi-connectivity"`
	TopologyConstraint	map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint	`path:"topology-constraint" module:"tapi-connectivity"`
	Uuid	*string	`path:"uuid" module:"tapi-connectivity"`
}

// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService) IsYANGGoStruct() {}

// NewConnection creates a new entry in the Connection 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) NewConnection(ConnectionUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.Connection == nil {
		t.Connection = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	key := ConnectionUuid
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.Connection[key]; ok {
		return nil, fmt.Errorf("duplicate key %v for list Connection", key)
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	t.Connection[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection{
		ConnectionUuid: &ConnectionUuid,
Manuel Kieweg's avatar
Manuel Kieweg committed
	}

	return t.Connection[key], nil
Manuel Kieweg's avatar
Manuel Kieweg committed
}

// NewConnectivityService creates a new entry in the ConnectivityService 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) NewConnectivityService(ConnectivityServiceUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService, error){
Manuel Kieweg's avatar
Manuel Kieweg committed

	// Initialise the list within the receiver struct if it has not already been
	// created.
	if t.ConnectivityService == nil {
		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,
	}
Loading
Loading full blame...