diff --git a/exampleocpath/ocpath.go b/exampleocpath/ocpath.go index 0900e5ea5..13bf52726 100644 --- a/exampleocpath/ocpath.go +++ b/exampleocpath/ocpath.go @@ -33,27 +33,10 @@ Imported modules were sourced from: package exampleocpath import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Root) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Acl represents the /openconfig-acl/acl YANG schema element. type Acl struct { *ygot.NodePath @@ -56818,6 +56801,16 @@ type LocalRoutes_AggregateAny struct { *ygot.NodePath } +// LocalRoutes_Aggregate_Description represents the /openconfig-local-routing/local-routes/local-aggregates/aggregate/state/description YANG schema element. +type LocalRoutes_Aggregate_Description struct { + *ygot.NodePath +} + +// LocalRoutes_Aggregate_DescriptionAny represents the wildcard version of the /openconfig-local-routing/local-routes/local-aggregates/aggregate/state/description YANG schema element. +type LocalRoutes_Aggregate_DescriptionAny struct { + *ygot.NodePath +} + // LocalRoutes_Aggregate_Discard represents the /openconfig-local-routing/local-routes/local-aggregates/aggregate/state/discard YANG schema element. type LocalRoutes_Aggregate_Discard struct { *ygot.NodePath @@ -56848,6 +56841,28 @@ type LocalRoutes_Aggregate_SetTagAny struct { *ygot.NodePath } +// Description returns from LocalRoutes_Aggregate the path struct for its child "description". +func (n *LocalRoutes_Aggregate) Description() *LocalRoutes_Aggregate_Description { + return &LocalRoutes_Aggregate_Description{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + +// Description returns from LocalRoutes_AggregateAny the path struct for its child "description". +func (n *LocalRoutes_AggregateAny) Description() *LocalRoutes_Aggregate_DescriptionAny { + return &LocalRoutes_Aggregate_DescriptionAny{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + // Discard returns from LocalRoutes_Aggregate the path struct for its child "discard". func (n *LocalRoutes_Aggregate) Discard() *LocalRoutes_Aggregate_Discard { return &LocalRoutes_Aggregate_Discard{ @@ -56924,6 +56939,16 @@ type LocalRoutes_StaticAny struct { *ygot.NodePath } +// LocalRoutes_Static_Description represents the /openconfig-local-routing/local-routes/static-routes/static/state/description YANG schema element. +type LocalRoutes_Static_Description struct { + *ygot.NodePath +} + +// LocalRoutes_Static_DescriptionAny represents the wildcard version of the /openconfig-local-routing/local-routes/static-routes/static/state/description YANG schema element. +type LocalRoutes_Static_DescriptionAny struct { + *ygot.NodePath +} + // LocalRoutes_Static_Prefix represents the /openconfig-local-routing/local-routes/static-routes/static/state/prefix YANG schema element. type LocalRoutes_Static_Prefix struct { *ygot.NodePath @@ -56944,6 +56969,28 @@ type LocalRoutes_Static_SetTagAny struct { *ygot.NodePath } +// Description returns from LocalRoutes_Static the path struct for its child "description". +func (n *LocalRoutes_Static) Description() *LocalRoutes_Static_Description { + return &LocalRoutes_Static_Description{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + +// Description returns from LocalRoutes_StaticAny the path struct for its child "description". +func (n *LocalRoutes_StaticAny) Description() *LocalRoutes_Static_DescriptionAny { + return &LocalRoutes_Static_DescriptionAny{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + // NextHopAny returns from LocalRoutes_Static the path struct for its child "next-hop". func (n *LocalRoutes_Static) NextHopAny() *LocalRoutes_Static_NextHopAny { return &LocalRoutes_Static_NextHopAny{ @@ -77248,6 +77295,16 @@ type NetworkInstance_Protocol_AggregateAny struct { *ygot.NodePath } +// NetworkInstance_Protocol_Aggregate_Description represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/local-aggregates/aggregate/state/description YANG schema element. +type NetworkInstance_Protocol_Aggregate_Description struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Aggregate_DescriptionAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/local-aggregates/aggregate/state/description YANG schema element. +type NetworkInstance_Protocol_Aggregate_DescriptionAny struct { + *ygot.NodePath +} + // NetworkInstance_Protocol_Aggregate_Discard represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/local-aggregates/aggregate/state/discard YANG schema element. type NetworkInstance_Protocol_Aggregate_Discard struct { *ygot.NodePath @@ -77278,6 +77335,28 @@ type NetworkInstance_Protocol_Aggregate_SetTagAny struct { *ygot.NodePath } +// Description returns from NetworkInstance_Protocol_Aggregate the path struct for its child "description". +func (n *NetworkInstance_Protocol_Aggregate) Description() *NetworkInstance_Protocol_Aggregate_Description { + return &NetworkInstance_Protocol_Aggregate_Description{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + +// Description returns from NetworkInstance_Protocol_AggregateAny the path struct for its child "description". +func (n *NetworkInstance_Protocol_AggregateAny) Description() *NetworkInstance_Protocol_Aggregate_DescriptionAny { + return &NetworkInstance_Protocol_Aggregate_DescriptionAny{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + // Discard returns from NetworkInstance_Protocol_Aggregate the path struct for its child "discard". func (n *NetworkInstance_Protocol_Aggregate) Discard() *NetworkInstance_Protocol_Aggregate_Discard { return &NetworkInstance_Protocol_Aggregate_Discard{ @@ -111852,6 +111931,28 @@ func (n *NetworkInstance_Protocol_Isis_InterfaceAny) Level(LevelNumber uint8) *N } } +// Mpls returns from NetworkInstance_Protocol_Isis_Interface the path struct for its child "mpls". +func (n *NetworkInstance_Protocol_Isis_Interface) Mpls() *NetworkInstance_Protocol_Isis_Interface_Mpls { + return &NetworkInstance_Protocol_Isis_Interface_Mpls{ + NodePath: ygot.NewNodePath( + []string{"mpls"}, + map[string]interface{}{}, + n, + ), + } +} + +// Mpls returns from NetworkInstance_Protocol_Isis_InterfaceAny the path struct for its child "mpls". +func (n *NetworkInstance_Protocol_Isis_InterfaceAny) Mpls() *NetworkInstance_Protocol_Isis_Interface_MplsAny { + return &NetworkInstance_Protocol_Isis_Interface_MplsAny{ + NodePath: ygot.NewNodePath( + []string{"mpls"}, + map[string]interface{}{}, + n, + ), + } +} + // Passive returns from NetworkInstance_Protocol_Isis_Interface the path struct for its child "passive". func (n *NetworkInstance_Protocol_Isis_Interface) Passive() *NetworkInstance_Protocol_Isis_Interface_Passive { return &NetworkInstance_Protocol_Isis_Interface_Passive{ @@ -115684,6 +115785,112 @@ func (n *NetworkInstance_Protocol_Isis_Interface_Level_TimersAny) HelloMultiplie } } +// NetworkInstance_Protocol_Isis_Interface_Mpls represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Isis_Interface_MplsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_MplsAny struct { + *ygot.NodePath +} + +// IgpLdpSync returns from NetworkInstance_Protocol_Isis_Interface_Mpls the path struct for its child "igp-ldp-sync". +func (n *NetworkInstance_Protocol_Isis_Interface_Mpls) IgpLdpSync() *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync { + return &NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync{ + NodePath: ygot.NewNodePath( + []string{"igp-ldp-sync"}, + map[string]interface{}{}, + n, + ), + } +} + +// IgpLdpSync returns from NetworkInstance_Protocol_Isis_Interface_MplsAny the path struct for its child "igp-ldp-sync". +func (n *NetworkInstance_Protocol_Isis_Interface_MplsAny) IgpLdpSync() *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny { + return &NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny{ + NodePath: ygot.NewNodePath( + []string{"igp-ldp-sync"}, + map[string]interface{}{}, + n, + ), + } +} + +// NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_Enabled represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync/state/enabled YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_Enabled struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_EnabledAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync/state/enabled YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_EnabledAny struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelay represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync/state/post-session-up-delay YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelay struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelayAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/mpls/igp-ldp-sync/state/post-session-up-delay YANG schema element. +type NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelayAny struct { + *ygot.NodePath +} + +// Enabled returns from NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync the path struct for its child "enabled". +func (n *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync) Enabled() *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_Enabled { + return &NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_Enabled{ + NodePath: ygot.NewNodePath( + []string{"state", "enabled"}, + map[string]interface{}{}, + n, + ), + } +} + +// Enabled returns from NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny the path struct for its child "enabled". +func (n *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny) Enabled() *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_EnabledAny { + return &NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_EnabledAny{ + NodePath: ygot.NewNodePath( + []string{"state", "enabled"}, + map[string]interface{}{}, + n, + ), + } +} + +// PostSessionUpDelay returns from NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync the path struct for its child "post-session-up-delay". +func (n *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync) PostSessionUpDelay() *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelay { + return &NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelay{ + NodePath: ygot.NewNodePath( + []string{"state", "post-session-up-delay"}, + map[string]interface{}{}, + n, + ), + } +} + +// PostSessionUpDelay returns from NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny the path struct for its child "post-session-up-delay". +func (n *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSyncAny) PostSessionUpDelay() *NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelayAny { + return &NetworkInstance_Protocol_Isis_Interface_Mpls_IgpLdpSync_PostSessionUpDelayAny{ + NodePath: ygot.NewNodePath( + []string{"state", "post-session-up-delay"}, + map[string]interface{}{}, + n, + ), + } +} + // NetworkInstance_Protocol_Isis_Interface_Timers represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/timers YANG schema element. type NetworkInstance_Protocol_Isis_Interface_Timers struct { *ygot.NodePath @@ -146968,6 +147175,16 @@ type NetworkInstance_Protocol_StaticAny struct { *ygot.NodePath } +// NetworkInstance_Protocol_Static_Description represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/static-routes/static/state/description YANG schema element. +type NetworkInstance_Protocol_Static_Description struct { + *ygot.NodePath +} + +// NetworkInstance_Protocol_Static_DescriptionAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/static-routes/static/state/description YANG schema element. +type NetworkInstance_Protocol_Static_DescriptionAny struct { + *ygot.NodePath +} + // NetworkInstance_Protocol_Static_Prefix represents the /openconfig-network-instance/network-instances/network-instance/protocols/protocol/static-routes/static/state/prefix YANG schema element. type NetworkInstance_Protocol_Static_Prefix struct { *ygot.NodePath @@ -146988,6 +147205,28 @@ type NetworkInstance_Protocol_Static_SetTagAny struct { *ygot.NodePath } +// Description returns from NetworkInstance_Protocol_Static the path struct for its child "description". +func (n *NetworkInstance_Protocol_Static) Description() *NetworkInstance_Protocol_Static_Description { + return &NetworkInstance_Protocol_Static_Description{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + +// Description returns from NetworkInstance_Protocol_StaticAny the path struct for its child "description". +func (n *NetworkInstance_Protocol_StaticAny) Description() *NetworkInstance_Protocol_Static_DescriptionAny { + return &NetworkInstance_Protocol_Static_DescriptionAny{ + NodePath: ygot.NewNodePath( + []string{"state", "description"}, + map[string]interface{}{}, + n, + ), + } +} + // NextHopAny returns from NetworkInstance_Protocol_Static the path struct for its child "next-hop". func (n *NetworkInstance_Protocol_Static) NextHopAny() *NetworkInstance_Protocol_Static_NextHopAny { return &NetworkInstance_Protocol_Static_NextHopAny{ @@ -147522,50 +147761,6 @@ type NetworkInstance_SegmentRoutingAny struct { *ygot.NodePath } -// SegmentListAny returns from NetworkInstance_SegmentRouting the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRouting) SegmentListAny() *NetworkInstance_SegmentRouting_SegmentListAny { - return &NetworkInstance_SegmentRouting_SegmentListAny{ - NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": "*"}, - n, - ), - } -} - -// SegmentListAny returns from NetworkInstance_SegmentRoutingAny the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRoutingAny) SegmentListAny() *NetworkInstance_SegmentRouting_SegmentListAny { - return &NetworkInstance_SegmentRouting_SegmentListAny{ - NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": "*"}, - n, - ), - } -} - -// SegmentList returns from NetworkInstance_SegmentRouting the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRouting) SegmentList(Id uint64) *NetworkInstance_SegmentRouting_SegmentList { - return &NetworkInstance_SegmentRouting_SegmentList{ - NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": Id}, - n, - ), - } -} - -// SegmentList returns from NetworkInstance_SegmentRoutingAny the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRoutingAny) SegmentList(Id uint64) *NetworkInstance_SegmentRouting_SegmentListAny { - return &NetworkInstance_SegmentRouting_SegmentListAny{ - NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": Id}, - n, - ), - } -} - // SrgbAny returns from NetworkInstance_SegmentRouting the path struct for its child "srgb". func (n *NetworkInstance_SegmentRouting) SrgbAny() *NetworkInstance_SegmentRouting_SrgbAny { return &NetworkInstance_SegmentRouting_SrgbAny{ @@ -147742,2404 +147937,2296 @@ func (n *NetworkInstance_SegmentRoutingAny) TePolicy(Color uint32, Endpoint stri } } -// NetworkInstance_SegmentRouting_SegmentList represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList struct { +// NetworkInstance_SegmentRouting_Srgb represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb YANG schema element. +type NetworkInstance_SegmentRouting_Srgb struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentListAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list YANG schema element. -type NetworkInstance_SegmentRouting_SegmentListAny struct { +// NetworkInstance_SegmentRouting_SrgbAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb YANG schema element. +type NetworkInstance_SegmentRouting_SrgbAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Id represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/id YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Id struct { +// NetworkInstance_SegmentRouting_Srgb_DataplaneType represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/dataplane-type YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_DataplaneType struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_IdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/id YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_IdAny struct { +// NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/dataplane-type YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctets struct { +// NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/ipv6-prefixes YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctetsAny struct { +// NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/ipv6-prefixes YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutLabeledPkts struct { +// NetworkInstance_SegmentRouting_Srgb_LocalId represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/local-id YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_LocalId struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutLabeledPktsAny struct { +// NetworkInstance_SegmentRouting_Srgb_LocalIdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/local-id YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_LocalIdAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutOctets struct { +// NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/mpls-label-blocks YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutOctetsAny struct { +// NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/mpls-label-blocks YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutPkts struct { +// NetworkInstance_SegmentRouting_Srgb_Size represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/size YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_Size struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_OutPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/state/out-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_OutPktsAny struct { +// NetworkInstance_SegmentRouting_Srgb_SizeAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/size YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_SizeAny struct { *ygot.NodePath } -// Id returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "id". -func (n *NetworkInstance_SegmentRouting_SegmentList) Id() *NetworkInstance_SegmentRouting_SegmentList_Id { - return &NetworkInstance_SegmentRouting_SegmentList_Id{ - NodePath: ygot.NewNodePath( - []string{"state", "id"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_Srgb_Used represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/used YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_Used struct { + *ygot.NodePath } -// Id returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "id". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) Id() *NetworkInstance_SegmentRouting_SegmentList_IdAny { - return &NetworkInstance_SegmentRouting_SegmentList_IdAny{ - NodePath: ygot.NewNodePath( - []string{"state", "id"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_Srgb_UsedAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/used YANG schema element. +type NetworkInstance_SegmentRouting_Srgb_UsedAny struct { + *ygot.NodePath } -// NextHopAny returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "next-hop". -func (n *NetworkInstance_SegmentRouting_SegmentList) NextHopAny() *NetworkInstance_SegmentRouting_SegmentList_NextHopAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHopAny{ +// DataplaneType returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "dataplane-type". +func (n *NetworkInstance_SegmentRouting_Srgb) DataplaneType() *NetworkInstance_SegmentRouting_Srgb_DataplaneType { + return &NetworkInstance_SegmentRouting_Srgb_DataplaneType{ NodePath: ygot.NewNodePath( - []string{"next-hops", "next-hop"}, - map[string]interface{}{"index": "*"}, + []string{"state", "dataplane-type"}, + map[string]interface{}{}, n, ), } } -// NextHopAny returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "next-hop". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) NextHopAny() *NetworkInstance_SegmentRouting_SegmentList_NextHopAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHopAny{ +// DataplaneType returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "dataplane-type". +func (n *NetworkInstance_SegmentRouting_SrgbAny) DataplaneType() *NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny { + return &NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny{ NodePath: ygot.NewNodePath( - []string{"next-hops", "next-hop"}, - map[string]interface{}{"index": "*"}, + []string{"state", "dataplane-type"}, + map[string]interface{}{}, n, ), } } -// NextHop returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "next-hop". -func (n *NetworkInstance_SegmentRouting_SegmentList) NextHop(Index uint32) *NetworkInstance_SegmentRouting_SegmentList_NextHop { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop{ +// Ipv6Prefixes returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "ipv6-prefixes". +func (n *NetworkInstance_SegmentRouting_Srgb) Ipv6Prefixes() *NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes { + return &NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes{ NodePath: ygot.NewNodePath( - []string{"next-hops", "next-hop"}, - map[string]interface{}{"index": Index}, + []string{"state", "ipv6-prefixes"}, + map[string]interface{}{}, n, ), } } -// NextHop returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "next-hop". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) NextHop(Index uint32) *NetworkInstance_SegmentRouting_SegmentList_NextHopAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHopAny{ +// Ipv6Prefixes returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "ipv6-prefixes". +func (n *NetworkInstance_SegmentRouting_SrgbAny) Ipv6Prefixes() *NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny { + return &NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny{ NodePath: ygot.NewNodePath( - []string{"next-hops", "next-hop"}, - map[string]interface{}{"index": Index}, + []string{"state", "ipv6-prefixes"}, + map[string]interface{}{}, n, ), } } -// OutLabeledOctets returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "out-labeled-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList) OutLabeledOctets() *NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctets { - return &NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctets{ +// LocalId returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "local-id". +func (n *NetworkInstance_SegmentRouting_Srgb) LocalId() *NetworkInstance_SegmentRouting_Srgb_LocalId { + return &NetworkInstance_SegmentRouting_Srgb_LocalId{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-octets"}, + []string{"state", "local-id"}, map[string]interface{}{}, n, ), } } -// OutLabeledOctets returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "out-labeled-octets". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) OutLabeledOctets() *NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctetsAny { - return &NetworkInstance_SegmentRouting_SegmentList_OutLabeledOctetsAny{ +// LocalId returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "local-id". +func (n *NetworkInstance_SegmentRouting_SrgbAny) LocalId() *NetworkInstance_SegmentRouting_Srgb_LocalIdAny { + return &NetworkInstance_SegmentRouting_Srgb_LocalIdAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-octets"}, + []string{"state", "local-id"}, map[string]interface{}{}, n, ), } } -// OutLabeledPkts returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "out-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList) OutLabeledPkts() *NetworkInstance_SegmentRouting_SegmentList_OutLabeledPkts { - return &NetworkInstance_SegmentRouting_SegmentList_OutLabeledPkts{ +// MplsLabelBlocks returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "mpls-label-blocks". +func (n *NetworkInstance_SegmentRouting_Srgb) MplsLabelBlocks() *NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks { + return &NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-pkts"}, + []string{"state", "mpls-label-blocks"}, map[string]interface{}{}, n, ), } } -// OutLabeledPkts returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "out-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) OutLabeledPkts() *NetworkInstance_SegmentRouting_SegmentList_OutLabeledPktsAny { - return &NetworkInstance_SegmentRouting_SegmentList_OutLabeledPktsAny{ +// MplsLabelBlocks returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "mpls-label-blocks". +func (n *NetworkInstance_SegmentRouting_SrgbAny) MplsLabelBlocks() *NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny { + return &NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-pkts"}, + []string{"state", "mpls-label-blocks"}, map[string]interface{}{}, n, ), } } -// OutOctets returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "out-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList) OutOctets() *NetworkInstance_SegmentRouting_SegmentList_OutOctets { - return &NetworkInstance_SegmentRouting_SegmentList_OutOctets{ +// Size returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "size". +func (n *NetworkInstance_SegmentRouting_Srgb) Size() *NetworkInstance_SegmentRouting_Srgb_Size { + return &NetworkInstance_SegmentRouting_Srgb_Size{ NodePath: ygot.NewNodePath( - []string{"state", "out-octets"}, + []string{"state", "size"}, map[string]interface{}{}, n, ), } } -// OutOctets returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "out-octets". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) OutOctets() *NetworkInstance_SegmentRouting_SegmentList_OutOctetsAny { - return &NetworkInstance_SegmentRouting_SegmentList_OutOctetsAny{ +// Size returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "size". +func (n *NetworkInstance_SegmentRouting_SrgbAny) Size() *NetworkInstance_SegmentRouting_Srgb_SizeAny { + return &NetworkInstance_SegmentRouting_Srgb_SizeAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-octets"}, + []string{"state", "size"}, map[string]interface{}{}, n, ), } } -// OutPkts returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "out-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList) OutPkts() *NetworkInstance_SegmentRouting_SegmentList_OutPkts { - return &NetworkInstance_SegmentRouting_SegmentList_OutPkts{ +// Used returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "used". +func (n *NetworkInstance_SegmentRouting_Srgb) Used() *NetworkInstance_SegmentRouting_Srgb_Used { + return &NetworkInstance_SegmentRouting_Srgb_Used{ NodePath: ygot.NewNodePath( - []string{"state", "out-pkts"}, + []string{"state", "used"}, map[string]interface{}{}, n, ), } } -// OutPkts returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "out-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) OutPkts() *NetworkInstance_SegmentRouting_SegmentList_OutPktsAny { - return &NetworkInstance_SegmentRouting_SegmentList_OutPktsAny{ +// Used returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "used". +func (n *NetworkInstance_SegmentRouting_SrgbAny) Used() *NetworkInstance_SegmentRouting_Srgb_UsedAny { + return &NetworkInstance_SegmentRouting_Srgb_UsedAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-pkts"}, + []string{"state", "used"}, map[string]interface{}{}, n, ), } } -// SidAny returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "sid". -func (n *NetworkInstance_SegmentRouting_SegmentList) SidAny() *NetworkInstance_SegmentRouting_SegmentList_SidAny { - return &NetworkInstance_SegmentRouting_SegmentList_SidAny{ - NodePath: ygot.NewNodePath( - []string{"sids", "sid"}, - map[string]interface{}{"index": "*"}, - n, - ), - } +// NetworkInstance_SegmentRouting_Srlb represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb YANG schema element. +type NetworkInstance_SegmentRouting_Srlb struct { + *ygot.NodePath } -// SidAny returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "sid". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) SidAny() *NetworkInstance_SegmentRouting_SegmentList_SidAny { - return &NetworkInstance_SegmentRouting_SegmentList_SidAny{ - NodePath: ygot.NewNodePath( - []string{"sids", "sid"}, - map[string]interface{}{"index": "*"}, - n, - ), - } +// NetworkInstance_SegmentRouting_SrlbAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb YANG schema element. +type NetworkInstance_SegmentRouting_SrlbAny struct { + *ygot.NodePath } -// Sid returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "sid". -func (n *NetworkInstance_SegmentRouting_SegmentList) Sid(Index uint64) *NetworkInstance_SegmentRouting_SegmentList_Sid { - return &NetworkInstance_SegmentRouting_SegmentList_Sid{ - NodePath: ygot.NewNodePath( - []string{"sids", "sid"}, - map[string]interface{}{"index": Index}, - n, - ), - } +// NetworkInstance_SegmentRouting_Srlb_DataplaneType represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/dataplane-type YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_DataplaneType struct { + *ygot.NodePath } -// Sid returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "sid". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) Sid(Index uint64) *NetworkInstance_SegmentRouting_SegmentList_SidAny { - return &NetworkInstance_SegmentRouting_SegmentList_SidAny{ - NodePath: ygot.NewNodePath( - []string{"sids", "sid"}, - map[string]interface{}{"index": Index}, - n, - ), - } +// NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/dataplane-type YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny struct { + *ygot.NodePath } -// TePolicyAny returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentList) TePolicyAny() *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/ipv6-prefix YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/ipv6-prefix YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_Srlb_LocalId represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/local-id YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_LocalId struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_Srlb_LocalIdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/local-id YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_LocalIdAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/mpls-label-block YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/mpls-label-block YANG schema element. +type NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny struct { + *ygot.NodePath +} + +// DataplaneType returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "dataplane-type". +func (n *NetworkInstance_SegmentRouting_Srlb) DataplaneType() *NetworkInstance_SegmentRouting_Srlb_DataplaneType { + return &NetworkInstance_SegmentRouting_Srlb_DataplaneType{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": "*", "color": "*"}, + []string{"state", "dataplane-type"}, + map[string]interface{}{}, n, ), } } -// TePolicyAny returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) TePolicyAny() *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// DataplaneType returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "dataplane-type". +func (n *NetworkInstance_SegmentRouting_SrlbAny) DataplaneType() *NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny { + return &NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": "*", "color": "*"}, + []string{"state", "dataplane-type"}, + map[string]interface{}{}, n, ), } } -// TePolicyAnyColor returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentList) TePolicyAnyColor(Endpoint string) *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// Ipv6Prefix returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "ipv6-prefix". +func (n *NetworkInstance_SegmentRouting_Srlb) Ipv6Prefix() *NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix { + return &NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": Endpoint, "color": "*"}, + []string{"state", "ipv6-prefix"}, + map[string]interface{}{}, n, ), } } -// TePolicyAnyColor returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) TePolicyAnyColor(Endpoint string) *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// Ipv6Prefix returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "ipv6-prefix". +func (n *NetworkInstance_SegmentRouting_SrlbAny) Ipv6Prefix() *NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny { + return &NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": Endpoint, "color": "*"}, + []string{"state", "ipv6-prefix"}, + map[string]interface{}{}, n, ), } } -// TePolicyAnyEndpoint returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentList) TePolicyAnyEndpoint(Color uint32) *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// LocalId returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "local-id". +func (n *NetworkInstance_SegmentRouting_Srlb) LocalId() *NetworkInstance_SegmentRouting_Srlb_LocalId { + return &NetworkInstance_SegmentRouting_Srlb_LocalId{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": "*", "color": Color}, + []string{"state", "local-id"}, + map[string]interface{}{}, n, ), } } -// TePolicyAnyEndpoint returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) TePolicyAnyEndpoint(Color uint32) *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// LocalId returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "local-id". +func (n *NetworkInstance_SegmentRouting_SrlbAny) LocalId() *NetworkInstance_SegmentRouting_Srlb_LocalIdAny { + return &NetworkInstance_SegmentRouting_Srlb_LocalIdAny{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": "*", "color": Color}, + []string{"state", "local-id"}, + map[string]interface{}{}, n, ), } } -// TePolicy returns from NetworkInstance_SegmentRouting_SegmentList the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentList) TePolicy(Endpoint string, Color uint32) *NetworkInstance_SegmentRouting_SegmentList_TePolicy { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy{ +// MplsLabelBlock returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "mpls-label-block". +func (n *NetworkInstance_SegmentRouting_Srlb) MplsLabelBlock() *NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock { + return &NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": Endpoint, "color": Color}, + []string{"state", "mpls-label-block"}, + map[string]interface{}{}, n, ), } } -// TePolicy returns from NetworkInstance_SegmentRouting_SegmentListAny the path struct for its child "te-policy". -func (n *NetworkInstance_SegmentRouting_SegmentListAny) TePolicy(Endpoint string, Color uint32) *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicyAny{ +// MplsLabelBlock returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "mpls-label-block". +func (n *NetworkInstance_SegmentRouting_SrlbAny) MplsLabelBlock() *NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny { + return &NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny{ NodePath: ygot.NewNodePath( - []string{"te-policies", "te-policy"}, - map[string]interface{}{"endpoint": Endpoint, "color": Color}, + []string{"state", "mpls-label-block"}, + map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_SegmentList_NextHop represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_NextHopAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHopAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeader represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/encapsulate-header YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeader struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeaderAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/encapsulate-header YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeaderAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_NextHop_Index represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/index YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_Index struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_NextHop_IndexAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/index YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_IndexAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddress represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/ip-address YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddress struct { +// NetworkInstance_SegmentRouting_TePolicy represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddressAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/ip-address YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddressAny struct { +// NetworkInstance_SegmentRouting_TePolicyAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy YANG schema element. +type NetworkInstance_SegmentRouting_TePolicyAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddress represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/mac-address YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddress struct { +// NetworkInstance_SegmentRouting_TePolicy_Active represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Active struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddressAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/mac-address YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddressAny struct { +// NetworkInstance_SegmentRouting_TePolicy_ActiveAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_ActiveAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocol represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/origin-protocol YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocol struct { +// NetworkInstance_SegmentRouting_TePolicy_ActiveSince represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-since YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_ActiveSince struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocolAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/origin-protocol YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocolAny struct { +// NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-since YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctets struct { +// NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-transitions YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctetsAny struct { +// NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-transitions YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPkts struct { +// NetworkInstance_SegmentRouting_TePolicy_Bsid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/bsid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Bsid struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPktsAny struct { +// NetworkInstance_SegmentRouting_TePolicy_BsidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/bsid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_BsidAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctets struct { +// NetworkInstance_SegmentRouting_TePolicy_Color represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/color YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Color struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctetsAny struct { +// NetworkInstance_SegmentRouting_TePolicy_ColorAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/color YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_ColorAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPkts struct { +// NetworkInstance_SegmentRouting_TePolicy_Endpoint represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/endpoint YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Endpoint struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/out-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPktsAny struct { +// NetworkInstance_SegmentRouting_TePolicy_EndpointAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/endpoint YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_EndpointAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStack represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/pushed-mpls-label-stack YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStack struct { +// NetworkInstance_SegmentRouting_TePolicy_Name represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/name YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Name struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStackAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/state/pushed-mpls-label-stack YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStackAny struct { +// NetworkInstance_SegmentRouting_TePolicy_NameAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/name YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_NameAny struct { *ygot.NodePath } -// EncapsulateHeader returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "encapsulate-header". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) EncapsulateHeader() *NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeader { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeader{ +// Active returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "active". +func (n *NetworkInstance_SegmentRouting_TePolicy) Active() *NetworkInstance_SegmentRouting_TePolicy_Active { + return &NetworkInstance_SegmentRouting_TePolicy_Active{ NodePath: ygot.NewNodePath( - []string{"state", "encapsulate-header"}, + []string{"state", "active"}, map[string]interface{}{}, n, ), } } -// EncapsulateHeader returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "encapsulate-header". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) EncapsulateHeader() *NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeaderAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_EncapsulateHeaderAny{ +// Active returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "active". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) Active() *NetworkInstance_SegmentRouting_TePolicy_ActiveAny { + return &NetworkInstance_SegmentRouting_TePolicy_ActiveAny{ NodePath: ygot.NewNodePath( - []string{"state", "encapsulate-header"}, + []string{"state", "active"}, map[string]interface{}{}, n, ), } } -// Index returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "index". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) Index() *NetworkInstance_SegmentRouting_SegmentList_NextHop_Index { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_Index{ +// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "active-since". +func (n *NetworkInstance_SegmentRouting_TePolicy) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_ActiveSince { + return &NetworkInstance_SegmentRouting_TePolicy_ActiveSince{ NodePath: ygot.NewNodePath( - []string{"state", "index"}, + []string{"state", "active-since"}, map[string]interface{}{}, n, ), } } -// Index returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "index". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) Index() *NetworkInstance_SegmentRouting_SegmentList_NextHop_IndexAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_IndexAny{ +// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "active-since". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny { + return &NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny{ NodePath: ygot.NewNodePath( - []string{"state", "index"}, + []string{"state", "active-since"}, map[string]interface{}{}, n, ), } } -// InterfaceRef returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "interface-ref". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) InterfaceRef() *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef{ +// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "active-transitions". +func (n *NetworkInstance_SegmentRouting_TePolicy) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions { + return &NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions{ NodePath: ygot.NewNodePath( - []string{"interface-ref"}, + []string{"state", "active-transitions"}, map[string]interface{}{}, n, ), } } -// InterfaceRef returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "interface-ref". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) InterfaceRef() *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny{ +// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "active-transitions". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny { + return &NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny{ NodePath: ygot.NewNodePath( - []string{"interface-ref"}, + []string{"state", "active-transitions"}, map[string]interface{}{}, n, ), } } -// IpAddress returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "ip-address". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) IpAddress() *NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddress { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddress{ +// Bsid returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "bsid". +func (n *NetworkInstance_SegmentRouting_TePolicy) Bsid() *NetworkInstance_SegmentRouting_TePolicy_Bsid { + return &NetworkInstance_SegmentRouting_TePolicy_Bsid{ NodePath: ygot.NewNodePath( - []string{"state", "ip-address"}, + []string{"state", "bsid"}, map[string]interface{}{}, n, ), } } -// IpAddress returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "ip-address". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) IpAddress() *NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddressAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_IpAddressAny{ +// Bsid returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "bsid". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) Bsid() *NetworkInstance_SegmentRouting_TePolicy_BsidAny { + return &NetworkInstance_SegmentRouting_TePolicy_BsidAny{ NodePath: ygot.NewNodePath( - []string{"state", "ip-address"}, + []string{"state", "bsid"}, map[string]interface{}{}, n, ), } } -// MacAddress returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "mac-address". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) MacAddress() *NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddress { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddress{ +// CandidatePathAny returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "candidate-path". +func (n *NetworkInstance_SegmentRouting_TePolicy) CandidatePathAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny{ NodePath: ygot.NewNodePath( - []string{"state", "mac-address"}, - map[string]interface{}{}, + []string{"candidate-paths", "candidate-path"}, + map[string]interface{}{"protocol-origin": "*", "originator-asn": "*", "originator-addr": "*", "discriminator": "*"}, n, ), } } -// MacAddress returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "mac-address". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) MacAddress() *NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddressAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_MacAddressAny{ +// CandidatePathAny returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "candidate-path". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) CandidatePathAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny{ NodePath: ygot.NewNodePath( - []string{"state", "mac-address"}, - map[string]interface{}{}, + []string{"candidate-paths", "candidate-path"}, + map[string]interface{}{"protocol-origin": "*", "originator-asn": "*", "originator-addr": "*", "discriminator": "*"}, n, ), } } -// OriginProtocol returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "origin-protocol". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) OriginProtocol() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocol { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocol{ - NodePath: ygot.NewNodePath( - []string{"state", "origin-protocol"}, - map[string]interface{}{}, - n, - ), - } +// WithProtocolOrigin sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "protocol-origin" to the specified value. +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithProtocolOrigin(ProtocolOrigin oc.E_OpenconfigSrtePolicy_SrteProtocolType) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { + ygot.ModifyKey(n.NodePath, "protocol-origin", ProtocolOrigin) + return n } -// OriginProtocol returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "origin-protocol". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) OriginProtocol() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocolAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OriginProtocolAny{ - NodePath: ygot.NewNodePath( - []string{"state", "origin-protocol"}, - map[string]interface{}{}, - n, - ), - } +// WithOriginatorAsn sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "originator-asn" to the specified value. +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithOriginatorAsn(OriginatorAsn uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { + ygot.ModifyKey(n.NodePath, "originator-asn", OriginatorAsn) + return n } -// OutLabeledOctets returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "out-labeled-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) OutLabeledOctets() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctets { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctets{ - NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-octets"}, - map[string]interface{}{}, - n, - ), - } +// WithOriginatorAddr sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "originator-addr" to the specified value. +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithOriginatorAddr(OriginatorAddr string) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { + ygot.ModifyKey(n.NodePath, "originator-addr", OriginatorAddr) + return n } -// OutLabeledOctets returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "out-labeled-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) OutLabeledOctets() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctetsAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledOctetsAny{ - NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-octets"}, - map[string]interface{}{}, - n, - ), - } +// WithDiscriminator sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "discriminator" to the specified value. +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithDiscriminator(Discriminator uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { + ygot.ModifyKey(n.NodePath, "discriminator", Discriminator) + return n } -// OutLabeledPkts returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "out-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) OutLabeledPkts() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPkts { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPkts{ +// Color returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "color". +func (n *NetworkInstance_SegmentRouting_TePolicy) Color() *NetworkInstance_SegmentRouting_TePolicy_Color { + return &NetworkInstance_SegmentRouting_TePolicy_Color{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-pkts"}, + []string{"state", "color"}, map[string]interface{}{}, n, ), } } -// OutLabeledPkts returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "out-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) OutLabeledPkts() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPktsAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutLabeledPktsAny{ +// Color returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "color". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) Color() *NetworkInstance_SegmentRouting_TePolicy_ColorAny { + return &NetworkInstance_SegmentRouting_TePolicy_ColorAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-pkts"}, + []string{"state", "color"}, map[string]interface{}{}, n, ), } } -// OutOctets returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "out-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) OutOctets() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctets { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctets{ +// Counters returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "counters". +func (n *NetworkInstance_SegmentRouting_TePolicy) Counters() *NetworkInstance_SegmentRouting_TePolicy_Counters { + return &NetworkInstance_SegmentRouting_TePolicy_Counters{ NodePath: ygot.NewNodePath( - []string{"state", "out-octets"}, + []string{"state", "counters"}, map[string]interface{}{}, n, ), } } -// OutOctets returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "out-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) OutOctets() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctetsAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutOctetsAny{ +// Counters returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "counters". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) Counters() *NetworkInstance_SegmentRouting_TePolicy_CountersAny { + return &NetworkInstance_SegmentRouting_TePolicy_CountersAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-octets"}, + []string{"state", "counters"}, map[string]interface{}{}, n, ), } } -// OutPkts returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "out-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) OutPkts() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPkts { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPkts{ +// Endpoint returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "endpoint". +func (n *NetworkInstance_SegmentRouting_TePolicy) Endpoint() *NetworkInstance_SegmentRouting_TePolicy_Endpoint { + return &NetworkInstance_SegmentRouting_TePolicy_Endpoint{ NodePath: ygot.NewNodePath( - []string{"state", "out-pkts"}, + []string{"state", "endpoint"}, map[string]interface{}{}, n, ), } } -// OutPkts returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "out-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) OutPkts() *NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPktsAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_OutPktsAny{ +// Endpoint returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "endpoint". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) Endpoint() *NetworkInstance_SegmentRouting_TePolicy_EndpointAny { + return &NetworkInstance_SegmentRouting_TePolicy_EndpointAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-pkts"}, + []string{"state", "endpoint"}, map[string]interface{}{}, n, ), } } -// PushedMplsLabelStack returns from NetworkInstance_SegmentRouting_SegmentList_NextHop the path struct for its child "pushed-mpls-label-stack". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop) PushedMplsLabelStack() *NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStack { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStack{ +// Name returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "name". +func (n *NetworkInstance_SegmentRouting_TePolicy) Name() *NetworkInstance_SegmentRouting_TePolicy_Name { + return &NetworkInstance_SegmentRouting_TePolicy_Name{ NodePath: ygot.NewNodePath( - []string{"state", "pushed-mpls-label-stack"}, + []string{"state", "name"}, map[string]interface{}{}, n, ), } } -// PushedMplsLabelStack returns from NetworkInstance_SegmentRouting_SegmentList_NextHopAny the path struct for its child "pushed-mpls-label-stack". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHopAny) PushedMplsLabelStack() *NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStackAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_PushedMplsLabelStackAny{ +// Name returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "name". +func (n *NetworkInstance_SegmentRouting_TePolicyAny) Name() *NetworkInstance_SegmentRouting_TePolicy_NameAny { + return &NetworkInstance_SegmentRouting_TePolicy_NameAny{ NodePath: ygot.NewNodePath( - []string{"state", "pushed-mpls-label-stack"}, + []string{"state", "name"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/interface-ref YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/interface-ref YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Interface represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/interface YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Interface struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_InterfaceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/interface YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_InterfaceAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Subinterface represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/subinterface YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Subinterface struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-since YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_SubinterfaceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/subinterface YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_SubinterfaceAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-since YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny struct { *ygot.NodePath } -// Interface returns from NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef the path struct for its child "interface". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef) Interface() *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Interface { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Interface{ - NodePath: ygot.NewNodePath( - []string{"state", "interface"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-transitions YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions struct { + *ygot.NodePath } -// Interface returns from NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny the path struct for its child "interface". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny) Interface() *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_InterfaceAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_InterfaceAny{ - NodePath: ygot.NewNodePath( - []string{"state", "interface"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-transitions YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny struct { + *ygot.NodePath } -// Subinterface returns from NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef the path struct for its child "subinterface". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef) Subinterface() *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Subinterface { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_Subinterface{ - NodePath: ygot.NewNodePath( - []string{"state", "subinterface"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/discriminator YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator struct { + *ygot.NodePath } -// Subinterface returns from NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny the path struct for its child "subinterface". -func (n *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRefAny) Subinterface() *NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_SubinterfaceAny { - return &NetworkInstance_SegmentRouting_SegmentList_NextHop_InterfaceRef_SubinterfaceAny{ - NodePath: ygot.NewNodePath( - []string{"state", "subinterface"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/discriminator YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/enlp YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/enlp YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny struct { + *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/name YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_SidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_SidAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/name YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_Index represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/index YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_Index struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-addr YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_IndexAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/index YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_IndexAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-addr YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-asn YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-asn YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTc represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/mpls-tc YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTc struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/preference YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTcAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/mpls-tc YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTcAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/preference YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtl represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/mpls-ttl YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtl struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/protocol-origin YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtlAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/mpls-ttl YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtlAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/protocol-origin YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_Value represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/value YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_Value struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/valid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SegmentList_Sid_ValueAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/sids/sid/state/value YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_Sid_ValueAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/valid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny struct { *ygot.NodePath } -// Index returns from NetworkInstance_SegmentRouting_SegmentList_Sid the path struct for its child "index". -func (n *NetworkInstance_SegmentRouting_SegmentList_Sid) Index() *NetworkInstance_SegmentRouting_SegmentList_Sid_Index { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_Index{ +// Active returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "active". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Active() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active{ NodePath: ygot.NewNodePath( - []string{"state", "index"}, + []string{"state", "active"}, map[string]interface{}{}, n, ), } } -// Index returns from NetworkInstance_SegmentRouting_SegmentList_SidAny the path struct for its child "index". -func (n *NetworkInstance_SegmentRouting_SegmentList_SidAny) Index() *NetworkInstance_SegmentRouting_SegmentList_Sid_IndexAny { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_IndexAny{ +// Active returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "active". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Active() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny{ NodePath: ygot.NewNodePath( - []string{"state", "index"}, + []string{"state", "active"}, map[string]interface{}{}, n, ), } } -// MplsTc returns from NetworkInstance_SegmentRouting_SegmentList_Sid the path struct for its child "mpls-tc". -func (n *NetworkInstance_SegmentRouting_SegmentList_Sid) MplsTc() *NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTc { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTc{ +// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "active-since". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-tc"}, + []string{"state", "active-since"}, map[string]interface{}{}, n, ), } } -// MplsTc returns from NetworkInstance_SegmentRouting_SegmentList_SidAny the path struct for its child "mpls-tc". -func (n *NetworkInstance_SegmentRouting_SegmentList_SidAny) MplsTc() *NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTcAny { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTcAny{ +// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "active-since". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-tc"}, + []string{"state", "active-since"}, map[string]interface{}{}, n, ), } } -// MplsTtl returns from NetworkInstance_SegmentRouting_SegmentList_Sid the path struct for its child "mpls-ttl". -func (n *NetworkInstance_SegmentRouting_SegmentList_Sid) MplsTtl() *NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtl { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtl{ +// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "active-transitions". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-ttl"}, + []string{"state", "active-transitions"}, map[string]interface{}{}, n, ), } } -// MplsTtl returns from NetworkInstance_SegmentRouting_SegmentList_SidAny the path struct for its child "mpls-ttl". -func (n *NetworkInstance_SegmentRouting_SegmentList_SidAny) MplsTtl() *NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtlAny { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_MplsTtlAny{ +// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "active-transitions". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-ttl"}, + []string{"state", "active-transitions"}, map[string]interface{}{}, n, ), } } -// Value returns from NetworkInstance_SegmentRouting_SegmentList_Sid the path struct for its child "value". -func (n *NetworkInstance_SegmentRouting_SegmentList_Sid) Value() *NetworkInstance_SegmentRouting_SegmentList_Sid_Value { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_Value{ +// Discriminator returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "discriminator". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Discriminator() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator{ NodePath: ygot.NewNodePath( - []string{"state", "value"}, + []string{"state", "discriminator"}, map[string]interface{}{}, n, ), } } -// Value returns from NetworkInstance_SegmentRouting_SegmentList_SidAny the path struct for its child "value". -func (n *NetworkInstance_SegmentRouting_SegmentList_SidAny) Value() *NetworkInstance_SegmentRouting_SegmentList_Sid_ValueAny { - return &NetworkInstance_SegmentRouting_SegmentList_Sid_ValueAny{ +// Discriminator returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "discriminator". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Discriminator() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny{ NodePath: ygot.NewNodePath( - []string{"state", "value"}, + []string{"state", "discriminator"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_SegmentList_TePolicy represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicyAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicyAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_Color represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/color YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_Color struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_ColorAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/color YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_ColorAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_Endpoint represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/endpoint YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_Endpoint struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_EndpointAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/endpoint YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_EndpointAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctets struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctetsAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPkts struct { - *ygot.NodePath +// Enlp returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "enlp". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Enlp() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp{ + NodePath: ygot.NewNodePath( + []string{"state", "enlp"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPktsAny struct { - *ygot.NodePath +// Enlp returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "enlp". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Enlp() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny{ + NodePath: ygot.NewNodePath( + []string{"state", "enlp"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctets struct { - *ygot.NodePath +// Name returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "name". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Name() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name{ + NodePath: ygot.NewNodePath( + []string{"state", "name"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-octets YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctetsAny struct { - *ygot.NodePath +// Name returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "name". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Name() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny{ + NodePath: ygot.NewNodePath( + []string{"state", "name"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPkts struct { - *ygot.NodePath +// OriginatorAddr returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "originator-addr". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) OriginatorAddr() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr{ + NodePath: ygot.NewNodePath( + []string{"state", "originator-addr"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/segment-lists/segment-list/te-policies/te-policy/state/out-pkts YANG schema element. -type NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPktsAny struct { - *ygot.NodePath +// OriginatorAddr returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "originator-addr". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) OriginatorAddr() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny{ + NodePath: ygot.NewNodePath( + []string{"state", "originator-addr"}, + map[string]interface{}{}, + n, + ), + } } -// Color returns from NetworkInstance_SegmentRouting_SegmentList_TePolicy the path struct for its child "color". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicy) Color() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_Color { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_Color{ +// OriginatorAsn returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "originator-asn". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) OriginatorAsn() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn{ NodePath: ygot.NewNodePath( - []string{"state", "color"}, + []string{"state", "originator-asn"}, map[string]interface{}{}, n, ), } } -// Color returns from NetworkInstance_SegmentRouting_SegmentList_TePolicyAny the path struct for its child "color". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny) Color() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_ColorAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_ColorAny{ +// OriginatorAsn returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "originator-asn". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) OriginatorAsn() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny{ NodePath: ygot.NewNodePath( - []string{"state", "color"}, + []string{"state", "originator-asn"}, map[string]interface{}{}, n, ), } } -// Endpoint returns from NetworkInstance_SegmentRouting_SegmentList_TePolicy the path struct for its child "endpoint". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicy) Endpoint() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_Endpoint { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_Endpoint{ +// Preference returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "preference". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Preference() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference{ NodePath: ygot.NewNodePath( - []string{"state", "endpoint"}, + []string{"state", "preference"}, map[string]interface{}{}, n, ), } } -// Endpoint returns from NetworkInstance_SegmentRouting_SegmentList_TePolicyAny the path struct for its child "endpoint". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny) Endpoint() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_EndpointAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_EndpointAny{ +// Preference returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "preference". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Preference() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny{ NodePath: ygot.NewNodePath( - []string{"state", "endpoint"}, + []string{"state", "preference"}, map[string]interface{}{}, n, ), } } -// OutLabeledOctets returns from NetworkInstance_SegmentRouting_SegmentList_TePolicy the path struct for its child "out-labeled-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicy) OutLabeledOctets() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctets { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctets{ +// ProtocolOrigin returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "protocol-origin". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) ProtocolOrigin() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-octets"}, + []string{"state", "protocol-origin"}, map[string]interface{}{}, n, ), } } -// OutLabeledOctets returns from NetworkInstance_SegmentRouting_SegmentList_TePolicyAny the path struct for its child "out-labeled-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny) OutLabeledOctets() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctetsAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledOctetsAny{ +// ProtocolOrigin returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "protocol-origin". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) ProtocolOrigin() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-octets"}, + []string{"state", "protocol-origin"}, map[string]interface{}{}, n, ), } } -// OutLabeledPkts returns from NetworkInstance_SegmentRouting_SegmentList_TePolicy the path struct for its child "out-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicy) OutLabeledPkts() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPkts { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPkts{ +// SegmentListAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "segment-list". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) SegmentListAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-pkts"}, - map[string]interface{}{}, + []string{"segment-lists", "segment-list"}, + map[string]interface{}{"id": "*"}, n, ), } } -// OutLabeledPkts returns from NetworkInstance_SegmentRouting_SegmentList_TePolicyAny the path struct for its child "out-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny) OutLabeledPkts() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPktsAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutLabeledPktsAny{ +// SegmentListAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "segment-list". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) SegmentListAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-labeled-pkts"}, - map[string]interface{}{}, + []string{"segment-lists", "segment-list"}, + map[string]interface{}{"id": "*"}, n, ), } } -// OutOctets returns from NetworkInstance_SegmentRouting_SegmentList_TePolicy the path struct for its child "out-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicy) OutOctets() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctets { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctets{ +// SegmentList returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "segment-list". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) SegmentList(Id uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList{ NodePath: ygot.NewNodePath( - []string{"state", "out-octets"}, - map[string]interface{}{}, + []string{"segment-lists", "segment-list"}, + map[string]interface{}{"id": Id}, n, ), } } -// OutOctets returns from NetworkInstance_SegmentRouting_SegmentList_TePolicyAny the path struct for its child "out-octets". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny) OutOctets() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctetsAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutOctetsAny{ +// SegmentList returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "segment-list". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) SegmentList(Id uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-octets"}, - map[string]interface{}{}, + []string{"segment-lists", "segment-list"}, + map[string]interface{}{"id": Id}, n, ), } } -// OutPkts returns from NetworkInstance_SegmentRouting_SegmentList_TePolicy the path struct for its child "out-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicy) OutPkts() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPkts { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPkts{ +// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "valid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid{ NodePath: ygot.NewNodePath( - []string{"state", "out-pkts"}, + []string{"state", "valid"}, map[string]interface{}{}, n, ), } } -// OutPkts returns from NetworkInstance_SegmentRouting_SegmentList_TePolicyAny the path struct for its child "out-pkts". -func (n *NetworkInstance_SegmentRouting_SegmentList_TePolicyAny) OutPkts() *NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPktsAny { - return &NetworkInstance_SegmentRouting_SegmentList_TePolicy_OutPktsAny{ +// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "valid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny{ NodePath: ygot.NewNodePath( - []string{"state", "out-pkts"}, + []string{"state", "valid"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_Srgb represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb YANG schema element. -type NetworkInstance_SegmentRouting_Srgb struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SrgbAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb YANG schema element. -type NetworkInstance_SegmentRouting_SrgbAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_DataplaneType represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/dataplane-type YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_DataplaneType struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/id YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/dataplane-type YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/id YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/ipv6-prefixes YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/invalid-reason YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/ipv6-prefixes YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/invalid-reason YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_LocalId represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/local-id YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_LocalId struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/valid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_LocalIdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/local-id YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_LocalIdAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/valid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/mpls-label-blocks YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/weight YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/mpls-label-blocks YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/weight YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srgb_Size represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/size YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_Size struct { - *ygot.NodePath +// Counters returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "counters". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Counters() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters{ + NodePath: ygot.NewNodePath( + []string{"state", "counters"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_Srgb_SizeAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/size YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_SizeAny struct { - *ygot.NodePath +// Counters returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "counters". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Counters() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny{ + NodePath: ygot.NewNodePath( + []string{"state", "counters"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_Srgb_Used represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/used YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_Used struct { - *ygot.NodePath +// Id returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "id". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Id() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id{ + NodePath: ygot.NewNodePath( + []string{"state", "id"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_Srgb_UsedAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srgbs/srgb/state/used YANG schema element. -type NetworkInstance_SegmentRouting_Srgb_UsedAny struct { - *ygot.NodePath +// Id returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "id". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Id() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny{ + NodePath: ygot.NewNodePath( + []string{"state", "id"}, + map[string]interface{}{}, + n, + ), + } } -// DataplaneType returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "dataplane-type". -func (n *NetworkInstance_SegmentRouting_Srgb) DataplaneType() *NetworkInstance_SegmentRouting_Srgb_DataplaneType { - return &NetworkInstance_SegmentRouting_Srgb_DataplaneType{ +// InvalidReason returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "invalid-reason". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) InvalidReason() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason{ NodePath: ygot.NewNodePath( - []string{"state", "dataplane-type"}, + []string{"state", "invalid-reason"}, map[string]interface{}{}, n, ), } } -// DataplaneType returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "dataplane-type". -func (n *NetworkInstance_SegmentRouting_SrgbAny) DataplaneType() *NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny { - return &NetworkInstance_SegmentRouting_Srgb_DataplaneTypeAny{ +// InvalidReason returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "invalid-reason". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) InvalidReason() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny{ NodePath: ygot.NewNodePath( - []string{"state", "dataplane-type"}, + []string{"state", "invalid-reason"}, map[string]interface{}{}, n, ), } } -// Ipv6Prefixes returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "ipv6-prefixes". -func (n *NetworkInstance_SegmentRouting_Srgb) Ipv6Prefixes() *NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes { - return &NetworkInstance_SegmentRouting_Srgb_Ipv6Prefixes{ +// NextHopAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "next-hop". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) NextHopAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny{ NodePath: ygot.NewNodePath( - []string{"state", "ipv6-prefixes"}, - map[string]interface{}{}, + []string{"next-hops", "next-hop"}, + map[string]interface{}{"index": "*"}, n, ), } } -// Ipv6Prefixes returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "ipv6-prefixes". -func (n *NetworkInstance_SegmentRouting_SrgbAny) Ipv6Prefixes() *NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny { - return &NetworkInstance_SegmentRouting_Srgb_Ipv6PrefixesAny{ +// NextHopAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "next-hop". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) NextHopAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny{ NodePath: ygot.NewNodePath( - []string{"state", "ipv6-prefixes"}, - map[string]interface{}{}, + []string{"next-hops", "next-hop"}, + map[string]interface{}{"index": "*"}, n, ), } } -// LocalId returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "local-id". -func (n *NetworkInstance_SegmentRouting_Srgb) LocalId() *NetworkInstance_SegmentRouting_Srgb_LocalId { - return &NetworkInstance_SegmentRouting_Srgb_LocalId{ +// NextHop returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "next-hop". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) NextHop(Index uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop{ NodePath: ygot.NewNodePath( - []string{"state", "local-id"}, - map[string]interface{}{}, + []string{"next-hops", "next-hop"}, + map[string]interface{}{"index": Index}, n, ), } } -// LocalId returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "local-id". -func (n *NetworkInstance_SegmentRouting_SrgbAny) LocalId() *NetworkInstance_SegmentRouting_Srgb_LocalIdAny { - return &NetworkInstance_SegmentRouting_Srgb_LocalIdAny{ +// NextHop returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "next-hop". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) NextHop(Index uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny{ NodePath: ygot.NewNodePath( - []string{"state", "local-id"}, - map[string]interface{}{}, + []string{"next-hops", "next-hop"}, + map[string]interface{}{"index": Index}, n, ), } } -// MplsLabelBlocks returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "mpls-label-blocks". -func (n *NetworkInstance_SegmentRouting_Srgb) MplsLabelBlocks() *NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks { - return &NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocks{ +// SidAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "sid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) SidAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-label-blocks"}, - map[string]interface{}{}, + []string{"sids", "sid"}, + map[string]interface{}{"index": "*"}, n, ), } } -// MplsLabelBlocks returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "mpls-label-blocks". -func (n *NetworkInstance_SegmentRouting_SrgbAny) MplsLabelBlocks() *NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny { - return &NetworkInstance_SegmentRouting_Srgb_MplsLabelBlocksAny{ +// SidAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "sid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) SidAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-label-blocks"}, - map[string]interface{}{}, + []string{"sids", "sid"}, + map[string]interface{}{"index": "*"}, n, ), } } -// Size returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "size". -func (n *NetworkInstance_SegmentRouting_Srgb) Size() *NetworkInstance_SegmentRouting_Srgb_Size { - return &NetworkInstance_SegmentRouting_Srgb_Size{ +// Sid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "sid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Sid(Index uint64) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid{ NodePath: ygot.NewNodePath( - []string{"state", "size"}, + []string{"sids", "sid"}, + map[string]interface{}{"index": Index}, + n, + ), + } +} + +// Sid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "sid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Sid(Index uint64) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny{ + NodePath: ygot.NewNodePath( + []string{"sids", "sid"}, + map[string]interface{}{"index": Index}, + n, + ), + } +} + +// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "valid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid{ + NodePath: ygot.NewNodePath( + []string{"state", "valid"}, map[string]interface{}{}, n, ), } } -// Size returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "size". -func (n *NetworkInstance_SegmentRouting_SrgbAny) Size() *NetworkInstance_SegmentRouting_Srgb_SizeAny { - return &NetworkInstance_SegmentRouting_Srgb_SizeAny{ +// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "valid". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny{ NodePath: ygot.NewNodePath( - []string{"state", "size"}, + []string{"state", "valid"}, map[string]interface{}{}, n, ), } } -// Used returns from NetworkInstance_SegmentRouting_Srgb the path struct for its child "used". -func (n *NetworkInstance_SegmentRouting_Srgb) Used() *NetworkInstance_SegmentRouting_Srgb_Used { - return &NetworkInstance_SegmentRouting_Srgb_Used{ +// Weight returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "weight". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Weight() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight{ NodePath: ygot.NewNodePath( - []string{"state", "used"}, + []string{"state", "weight"}, map[string]interface{}{}, n, ), } } -// Used returns from NetworkInstance_SegmentRouting_SrgbAny the path struct for its child "used". -func (n *NetworkInstance_SegmentRouting_SrgbAny) Used() *NetworkInstance_SegmentRouting_Srgb_UsedAny { - return &NetworkInstance_SegmentRouting_Srgb_UsedAny{ +// Weight returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "weight". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Weight() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny{ NodePath: ygot.NewNodePath( - []string{"state", "used"}, + []string{"state", "weight"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_Srlb represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb YANG schema element. -type NetworkInstance_SegmentRouting_Srlb struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_SrlbAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb YANG schema element. -type NetworkInstance_SegmentRouting_SrlbAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_DataplaneType represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/dataplane-type YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_DataplaneType struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctets struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/dataplane-type YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctetsAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/ipv6-prefix YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPkts struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/ipv6-prefix YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPktsAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_LocalId represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/local-id YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_LocalId struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctets struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_LocalIdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/local-id YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_LocalIdAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctetsAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/mpls-label-block YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPkts struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/srlbs/srlb/state/mpls-label-block YANG schema element. -type NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/counters/out-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPktsAny struct { *ygot.NodePath } -// DataplaneType returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "dataplane-type". -func (n *NetworkInstance_SegmentRouting_Srlb) DataplaneType() *NetworkInstance_SegmentRouting_Srlb_DataplaneType { - return &NetworkInstance_SegmentRouting_Srlb_DataplaneType{ +// OutLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters the path struct for its child "out-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters) OutLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctets { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctets{ NodePath: ygot.NewNodePath( - []string{"state", "dataplane-type"}, + []string{"out-labeled-octets"}, map[string]interface{}{}, n, ), } } -// DataplaneType returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "dataplane-type". -func (n *NetworkInstance_SegmentRouting_SrlbAny) DataplaneType() *NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny { - return &NetworkInstance_SegmentRouting_Srlb_DataplaneTypeAny{ +// OutLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny the path struct for its child "out-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny) OutLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "dataplane-type"}, + []string{"out-labeled-octets"}, map[string]interface{}{}, n, ), } } -// Ipv6Prefix returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "ipv6-prefix". -func (n *NetworkInstance_SegmentRouting_Srlb) Ipv6Prefix() *NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix { - return &NetworkInstance_SegmentRouting_Srlb_Ipv6Prefix{ +// OutLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters the path struct for its child "out-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters) OutLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPkts { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPkts{ NodePath: ygot.NewNodePath( - []string{"state", "ipv6-prefix"}, + []string{"out-labeled-pkts"}, map[string]interface{}{}, n, ), } } -// Ipv6Prefix returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "ipv6-prefix". -func (n *NetworkInstance_SegmentRouting_SrlbAny) Ipv6Prefix() *NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny { - return &NetworkInstance_SegmentRouting_Srlb_Ipv6PrefixAny{ +// OutLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny the path struct for its child "out-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny) OutLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutLabeledPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "ipv6-prefix"}, + []string{"out-labeled-pkts"}, map[string]interface{}{}, n, ), } } -// LocalId returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "local-id". -func (n *NetworkInstance_SegmentRouting_Srlb) LocalId() *NetworkInstance_SegmentRouting_Srlb_LocalId { - return &NetworkInstance_SegmentRouting_Srlb_LocalId{ +// OutOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters the path struct for its child "out-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters) OutOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctets { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctets{ NodePath: ygot.NewNodePath( - []string{"state", "local-id"}, + []string{"out-octets"}, map[string]interface{}{}, n, ), } } -// LocalId returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "local-id". -func (n *NetworkInstance_SegmentRouting_SrlbAny) LocalId() *NetworkInstance_SegmentRouting_Srlb_LocalIdAny { - return &NetworkInstance_SegmentRouting_Srlb_LocalIdAny{ +// OutOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny the path struct for its child "out-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny) OutOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "local-id"}, + []string{"out-octets"}, map[string]interface{}{}, n, ), } } -// MplsLabelBlock returns from NetworkInstance_SegmentRouting_Srlb the path struct for its child "mpls-label-block". -func (n *NetworkInstance_SegmentRouting_Srlb) MplsLabelBlock() *NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock { - return &NetworkInstance_SegmentRouting_Srlb_MplsLabelBlock{ +// OutPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters the path struct for its child "out-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters) OutPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPkts { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPkts{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-label-block"}, + []string{"out-pkts"}, map[string]interface{}{}, n, ), } } -// MplsLabelBlock returns from NetworkInstance_SegmentRouting_SrlbAny the path struct for its child "mpls-label-block". -func (n *NetworkInstance_SegmentRouting_SrlbAny) MplsLabelBlock() *NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny { - return &NetworkInstance_SegmentRouting_Srlb_MplsLabelBlockAny{ +// OutPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny the path struct for its child "out-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_CountersAny) OutPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Counters_OutPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "mpls-label-block"}, + []string{"out-pkts"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_TePolicy represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicyAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy YANG schema element. -type NetworkInstance_SegmentRouting_TePolicyAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_Active represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_Active struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeader represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/encapsulate-header YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeader struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_ActiveAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_ActiveAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeaderAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/encapsulate-header YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeaderAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_ActiveSince represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-since YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_ActiveSince struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Index represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/index YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Index struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-since YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IndexAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/index YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IndexAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-transitions YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddress represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/ip-address YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddress struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/active-transitions YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_Bsid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/bsid YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_Bsid struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_BsidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/bsid YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_BsidAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddressAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/ip-address YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddressAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_Color represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/color YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_Color struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddress represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/mac-address YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddress struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_ColorAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/color YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_ColorAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddressAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/mac-address YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddressAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_Endpoint represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/endpoint YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_Endpoint struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocol represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/origin-protocol YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocol struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_EndpointAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/endpoint YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_EndpointAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocolAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/origin-protocol YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocolAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_InLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InLabeledOctets struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStack represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/pushed-mpls-label-stack YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStack struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_InLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-labeled-octets YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InLabeledOctetsAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStackAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/pushed-mpls-label-stack YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStackAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_InLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InLabeledPkts struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_InLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-labeled-pkts YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InLabeledPktsAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_InOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-octets YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InOctets struct { - *ygot.NodePath +// Counters returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "counters". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) Counters() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters{ + NodePath: ygot.NewNodePath( + []string{"state", "counters"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_TePolicy_InOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-octets YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InOctetsAny struct { - *ygot.NodePath +// Counters returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "counters". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) Counters() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny{ + NodePath: ygot.NewNodePath( + []string{"state", "counters"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_TePolicy_InPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-pkts YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InPkts struct { - *ygot.NodePath +// EncapsulateHeader returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "encapsulate-header". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) EncapsulateHeader() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeader { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeader{ + NodePath: ygot.NewNodePath( + []string{"state", "encapsulate-header"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_TePolicy_InPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/in-pkts YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_InPktsAny struct { - *ygot.NodePath +// EncapsulateHeader returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "encapsulate-header". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) EncapsulateHeader() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeaderAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_EncapsulateHeaderAny{ + NodePath: ygot.NewNodePath( + []string{"state", "encapsulate-header"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_TePolicy_Name represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/name YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_Name struct { - *ygot.NodePath +// Index returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "index". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) Index() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Index { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Index{ + NodePath: ygot.NewNodePath( + []string{"state", "index"}, + map[string]interface{}{}, + n, + ), + } } -// NetworkInstance_SegmentRouting_TePolicy_NameAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/name YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_NameAny struct { - *ygot.NodePath +// Index returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "index". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) Index() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IndexAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IndexAny{ + NodePath: ygot.NewNodePath( + []string{"state", "index"}, + map[string]interface{}{}, + n, + ), + } } -// Active returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "active". -func (n *NetworkInstance_SegmentRouting_TePolicy) Active() *NetworkInstance_SegmentRouting_TePolicy_Active { - return &NetworkInstance_SegmentRouting_TePolicy_Active{ +// InterfaceRef returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "interface-ref". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) InterfaceRef() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef{ NodePath: ygot.NewNodePath( - []string{"state", "active"}, + []string{"interface-ref"}, map[string]interface{}{}, n, ), } } -// Active returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "active". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) Active() *NetworkInstance_SegmentRouting_TePolicy_ActiveAny { - return &NetworkInstance_SegmentRouting_TePolicy_ActiveAny{ +// InterfaceRef returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "interface-ref". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) InterfaceRef() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny{ NodePath: ygot.NewNodePath( - []string{"state", "active"}, + []string{"interface-ref"}, map[string]interface{}{}, n, ), } } -// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "active-since". -func (n *NetworkInstance_SegmentRouting_TePolicy) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_ActiveSince { - return &NetworkInstance_SegmentRouting_TePolicy_ActiveSince{ +// IpAddress returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "ip-address". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) IpAddress() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddress { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddress{ NodePath: ygot.NewNodePath( - []string{"state", "active-since"}, + []string{"state", "ip-address"}, map[string]interface{}{}, n, ), } } -// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "active-since". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny { - return &NetworkInstance_SegmentRouting_TePolicy_ActiveSinceAny{ +// IpAddress returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "ip-address". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) IpAddress() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddressAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_IpAddressAny{ NodePath: ygot.NewNodePath( - []string{"state", "active-since"}, + []string{"state", "ip-address"}, map[string]interface{}{}, n, ), } } -// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "active-transitions". -func (n *NetworkInstance_SegmentRouting_TePolicy) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions { - return &NetworkInstance_SegmentRouting_TePolicy_ActiveTransitions{ +// MacAddress returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "mac-address". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) MacAddress() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddress { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddress{ NodePath: ygot.NewNodePath( - []string{"state", "active-transitions"}, + []string{"state", "mac-address"}, map[string]interface{}{}, n, ), } } -// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "active-transitions". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny { - return &NetworkInstance_SegmentRouting_TePolicy_ActiveTransitionsAny{ +// MacAddress returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "mac-address". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) MacAddress() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddressAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_MacAddressAny{ NodePath: ygot.NewNodePath( - []string{"state", "active-transitions"}, + []string{"state", "mac-address"}, map[string]interface{}{}, n, ), } } -// Bsid returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "bsid". -func (n *NetworkInstance_SegmentRouting_TePolicy) Bsid() *NetworkInstance_SegmentRouting_TePolicy_Bsid { - return &NetworkInstance_SegmentRouting_TePolicy_Bsid{ +// OriginProtocol returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "origin-protocol". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) OriginProtocol() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocol { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocol{ NodePath: ygot.NewNodePath( - []string{"state", "bsid"}, + []string{"state", "origin-protocol"}, map[string]interface{}{}, n, ), } } -// Bsid returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "bsid". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) Bsid() *NetworkInstance_SegmentRouting_TePolicy_BsidAny { - return &NetworkInstance_SegmentRouting_TePolicy_BsidAny{ +// OriginProtocol returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "origin-protocol". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) OriginProtocol() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocolAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_OriginProtocolAny{ NodePath: ygot.NewNodePath( - []string{"state", "bsid"}, + []string{"state", "origin-protocol"}, map[string]interface{}{}, n, ), } } -// CandidatePathAny returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "candidate-path". -func (n *NetworkInstance_SegmentRouting_TePolicy) CandidatePathAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny{ +// PushedMplsLabelStack returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop the path struct for its child "pushed-mpls-label-stack". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop) PushedMplsLabelStack() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStack { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStack{ NodePath: ygot.NewNodePath( - []string{"candidate-paths", "candidate-path"}, - map[string]interface{}{"protocol-origin": "*", "originator-asn": "*", "originator-addr": "*", "discriminator": "*"}, + []string{"state", "pushed-mpls-label-stack"}, + map[string]interface{}{}, n, ), } } -// CandidatePathAny returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "candidate-path". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) CandidatePathAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny{ +// PushedMplsLabelStack returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny the path struct for its child "pushed-mpls-label-stack". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHopAny) PushedMplsLabelStack() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStackAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_PushedMplsLabelStackAny{ NodePath: ygot.NewNodePath( - []string{"candidate-paths", "candidate-path"}, - map[string]interface{}{"protocol-origin": "*", "originator-asn": "*", "originator-addr": "*", "discriminator": "*"}, + []string{"state", "pushed-mpls-label-stack"}, + map[string]interface{}{}, n, ), } } -// WithProtocolOrigin sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "protocol-origin" to the specified value. -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithProtocolOrigin(ProtocolOrigin oc.E_OpenconfigSrtePolicy_SrteProtocolType) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { - ygot.ModifyKey(n.NodePath, "protocol-origin", ProtocolOrigin) - return n +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters struct { + *ygot.NodePath } -// WithOriginatorAsn sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "originator-asn" to the specified value. -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithOriginatorAsn(OriginatorAsn uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { - ygot.ModifyKey(n.NodePath, "originator-asn", OriginatorAsn) - return n +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny struct { + *ygot.NodePath } -// WithOriginatorAddr sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "originator-addr" to the specified value. -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithOriginatorAddr(OriginatorAddr string) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { - ygot.ModifyKey(n.NodePath, "originator-addr", OriginatorAddr) - return n +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctets struct { + *ygot.NodePath } -// WithDiscriminator sets NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny's key "discriminator" to the specified value. -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) WithDiscriminator(Discriminator uint32) *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny { - ygot.ModifyKey(n.NodePath, "discriminator", Discriminator) - return n +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctetsAny struct { + *ygot.NodePath } -// Color returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "color". -func (n *NetworkInstance_SegmentRouting_TePolicy) Color() *NetworkInstance_SegmentRouting_TePolicy_Color { - return &NetworkInstance_SegmentRouting_TePolicy_Color{ - NodePath: ygot.NewNodePath( - []string{"state", "color"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPkts struct { + *ygot.NodePath } -// Color returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "color". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) Color() *NetworkInstance_SegmentRouting_TePolicy_ColorAny { - return &NetworkInstance_SegmentRouting_TePolicy_ColorAny{ - NodePath: ygot.NewNodePath( - []string{"state", "color"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPktsAny struct { + *ygot.NodePath } -// Endpoint returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "endpoint". -func (n *NetworkInstance_SegmentRouting_TePolicy) Endpoint() *NetworkInstance_SegmentRouting_TePolicy_Endpoint { - return &NetworkInstance_SegmentRouting_TePolicy_Endpoint{ +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctets struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctetsAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPkts struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/state/counters/out-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPktsAny struct { + *ygot.NodePath +} + +// OutLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters the path struct for its child "out-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters) OutLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctets { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctets{ NodePath: ygot.NewNodePath( - []string{"state", "endpoint"}, + []string{"out-labeled-octets"}, map[string]interface{}{}, n, ), } } -// Endpoint returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "endpoint". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) Endpoint() *NetworkInstance_SegmentRouting_TePolicy_EndpointAny { - return &NetworkInstance_SegmentRouting_TePolicy_EndpointAny{ +// OutLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny the path struct for its child "out-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny) OutLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "endpoint"}, + []string{"out-labeled-octets"}, map[string]interface{}{}, n, ), } } -// InLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "in-labeled-octets". -func (n *NetworkInstance_SegmentRouting_TePolicy) InLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_InLabeledOctets { - return &NetworkInstance_SegmentRouting_TePolicy_InLabeledOctets{ +// OutLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters the path struct for its child "out-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters) OutLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPkts { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPkts{ NodePath: ygot.NewNodePath( - []string{"state", "in-labeled-octets"}, + []string{"out-labeled-pkts"}, map[string]interface{}{}, n, ), } } -// InLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "in-labeled-octets". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) InLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_InLabeledOctetsAny { - return &NetworkInstance_SegmentRouting_TePolicy_InLabeledOctetsAny{ +// OutLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny the path struct for its child "out-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny) OutLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutLabeledPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "in-labeled-octets"}, + []string{"out-labeled-pkts"}, map[string]interface{}{}, n, ), } } -// InLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "in-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_TePolicy) InLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_InLabeledPkts { - return &NetworkInstance_SegmentRouting_TePolicy_InLabeledPkts{ +// OutOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters the path struct for its child "out-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters) OutOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctets { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctets{ NodePath: ygot.NewNodePath( - []string{"state", "in-labeled-pkts"}, + []string{"out-octets"}, map[string]interface{}{}, n, ), } } -// InLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "in-labeled-pkts". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) InLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_InLabeledPktsAny { - return &NetworkInstance_SegmentRouting_TePolicy_InLabeledPktsAny{ +// OutOctets returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny the path struct for its child "out-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny) OutOctets() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "in-labeled-pkts"}, + []string{"out-octets"}, map[string]interface{}{}, n, ), } } -// InOctets returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "in-octets". -func (n *NetworkInstance_SegmentRouting_TePolicy) InOctets() *NetworkInstance_SegmentRouting_TePolicy_InOctets { - return &NetworkInstance_SegmentRouting_TePolicy_InOctets{ +// OutPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters the path struct for its child "out-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters) OutPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPkts { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPkts{ NodePath: ygot.NewNodePath( - []string{"state", "in-octets"}, + []string{"out-pkts"}, map[string]interface{}{}, n, ), } } -// InOctets returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "in-octets". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) InOctets() *NetworkInstance_SegmentRouting_TePolicy_InOctetsAny { - return &NetworkInstance_SegmentRouting_TePolicy_InOctetsAny{ +// OutPkts returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny the path struct for its child "out-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_CountersAny) OutPkts() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_Counters_OutPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "in-octets"}, + []string{"out-pkts"}, map[string]interface{}{}, n, ), } } -// InPkts returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "in-pkts". -func (n *NetworkInstance_SegmentRouting_TePolicy) InPkts() *NetworkInstance_SegmentRouting_TePolicy_InPkts { - return &NetworkInstance_SegmentRouting_TePolicy_InPkts{ +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/interface-ref YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/interface-ref YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Interface represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/interface YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Interface struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_InterfaceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/interface YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_InterfaceAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Subinterface represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/subinterface YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Subinterface struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_SubinterfaceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/next-hops/next-hop/interface-ref/state/subinterface YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_SubinterfaceAny struct { + *ygot.NodePath +} + +// Interface returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef the path struct for its child "interface". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef) Interface() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Interface { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Interface{ NodePath: ygot.NewNodePath( - []string{"state", "in-pkts"}, + []string{"state", "interface"}, map[string]interface{}{}, n, ), } } -// InPkts returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "in-pkts". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) InPkts() *NetworkInstance_SegmentRouting_TePolicy_InPktsAny { - return &NetworkInstance_SegmentRouting_TePolicy_InPktsAny{ +// Interface returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny the path struct for its child "interface". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny) Interface() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_InterfaceAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_InterfaceAny{ NodePath: ygot.NewNodePath( - []string{"state", "in-pkts"}, + []string{"state", "interface"}, map[string]interface{}{}, n, ), } } -// Name returns from NetworkInstance_SegmentRouting_TePolicy the path struct for its child "name". -func (n *NetworkInstance_SegmentRouting_TePolicy) Name() *NetworkInstance_SegmentRouting_TePolicy_Name { - return &NetworkInstance_SegmentRouting_TePolicy_Name{ +// Subinterface returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef the path struct for its child "subinterface". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef) Subinterface() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Subinterface { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_Subinterface{ NodePath: ygot.NewNodePath( - []string{"state", "name"}, + []string{"state", "subinterface"}, map[string]interface{}{}, n, ), } } -// Name returns from NetworkInstance_SegmentRouting_TePolicyAny the path struct for its child "name". -func (n *NetworkInstance_SegmentRouting_TePolicyAny) Name() *NetworkInstance_SegmentRouting_TePolicy_NameAny { - return &NetworkInstance_SegmentRouting_TePolicy_NameAny{ +// Subinterface returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny the path struct for its child "subinterface". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRefAny) Subinterface() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_SubinterfaceAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_NextHop_InterfaceRef_SubinterfaceAny{ NodePath: ygot.NewNodePath( - []string{"state", "name"}, + []string{"state", "subinterface"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-since YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-since YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Index represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/index YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Index struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-transitions YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_IndexAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/index YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_IndexAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/active-transitions YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTc represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/mpls-tc YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTc struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/discriminator YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTcAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/mpls-tc YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTcAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/discriminator YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtl represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/mpls-ttl YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtl struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/enlp YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtlAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/mpls-ttl YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtlAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/enlp YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Value represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/value YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Value struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/name YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name struct { +// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_ValueAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/sids/sid/state/value YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_ValueAny struct { *ygot.NodePath } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/name YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-addr YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-addr YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-asn YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/originator-asn YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/preference YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/preference YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/protocol-origin YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/protocol-origin YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/valid YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/state/valid YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny struct { - *ygot.NodePath -} - -// Active returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "active". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Active() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Active{ +// Index returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid the path struct for its child "index". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid) Index() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Index { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Index{ NodePath: ygot.NewNodePath( - []string{"state", "active"}, + []string{"state", "index"}, map[string]interface{}{}, n, ), } } -// Active returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "active". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Active() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveAny{ +// Index returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny the path struct for its child "index". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny) Index() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_IndexAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_IndexAny{ NodePath: ygot.NewNodePath( - []string{"state", "active"}, + []string{"state", "index"}, map[string]interface{}{}, n, ), } } -// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "active-since". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSince{ +// MplsTc returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid the path struct for its child "mpls-tc". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid) MplsTc() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTc { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTc{ NodePath: ygot.NewNodePath( - []string{"state", "active-since"}, + []string{"state", "mpls-tc"}, map[string]interface{}{}, n, ), } } -// ActiveSince returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "active-since". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) ActiveSince() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveSinceAny{ +// MplsTc returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny the path struct for its child "mpls-tc". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny) MplsTc() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTcAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTcAny{ NodePath: ygot.NewNodePath( - []string{"state", "active-since"}, + []string{"state", "mpls-tc"}, map[string]interface{}{}, n, ), } } -// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "active-transitions". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitions{ +// MplsTtl returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid the path struct for its child "mpls-ttl". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid) MplsTtl() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtl { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtl{ NodePath: ygot.NewNodePath( - []string{"state", "active-transitions"}, + []string{"state", "mpls-ttl"}, map[string]interface{}{}, n, ), } } -// ActiveTransitions returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "active-transitions". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) ActiveTransitions() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ActiveTransitionsAny{ +// MplsTtl returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny the path struct for its child "mpls-ttl". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny) MplsTtl() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtlAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_MplsTtlAny{ NodePath: ygot.NewNodePath( - []string{"state", "active-transitions"}, + []string{"state", "mpls-ttl"}, map[string]interface{}{}, n, ), } } -// Discriminator returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "discriminator". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Discriminator() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Discriminator{ +// Value returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid the path struct for its child "value". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid) Value() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Value { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_Value{ NodePath: ygot.NewNodePath( - []string{"state", "discriminator"}, + []string{"state", "value"}, map[string]interface{}{}, n, ), } } -// Discriminator returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "discriminator". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Discriminator() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_DiscriminatorAny{ +// Value returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny the path struct for its child "value". +func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_SidAny) Value() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_ValueAny { + return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Sid_ValueAny{ NodePath: ygot.NewNodePath( - []string{"state", "discriminator"}, + []string{"state", "value"}, map[string]interface{}{}, n, ), } } -// Enlp returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "enlp". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Enlp() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Enlp{ - NodePath: ygot.NewNodePath( - []string{"state", "enlp"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters struct { + *ygot.NodePath } -// Enlp returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "enlp". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Enlp() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_EnlpAny{ - NodePath: ygot.NewNodePath( - []string{"state", "enlp"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_CountersAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_CountersAny struct { + *ygot.NodePath } -// Name returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "name". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Name() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Name{ - NodePath: ygot.NewNodePath( - []string{"state", "name"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctets struct { + *ygot.NodePath } -// Name returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "name". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Name() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_NameAny{ - NodePath: ygot.NewNodePath( - []string{"state", "name"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctetsAny struct { + *ygot.NodePath } -// OriginatorAddr returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "originator-addr". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) OriginatorAddr() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddr{ - NodePath: ygot.NewNodePath( - []string{"state", "originator-addr"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPkts struct { + *ygot.NodePath } -// OriginatorAddr returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "originator-addr". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) OriginatorAddr() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAddrAny{ - NodePath: ygot.NewNodePath( - []string{"state", "originator-addr"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPktsAny struct { + *ygot.NodePath } -// OriginatorAsn returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "originator-asn". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) OriginatorAsn() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsn{ - NodePath: ygot.NewNodePath( - []string{"state", "originator-asn"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InOctets struct { + *ygot.NodePath } -// OriginatorAsn returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "originator-asn". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) OriginatorAsn() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_OriginatorAsnAny{ - NodePath: ygot.NewNodePath( - []string{"state", "originator-asn"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InOctetsAny struct { + *ygot.NodePath } -// Preference returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "preference". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Preference() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Preference{ - NodePath: ygot.NewNodePath( - []string{"state", "preference"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InPkts struct { + *ygot.NodePath } -// Preference returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "preference". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Preference() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_PreferenceAny{ - NodePath: ygot.NewNodePath( - []string{"state", "preference"}, - map[string]interface{}{}, - n, - ), - } +// NetworkInstance_SegmentRouting_TePolicy_Counters_InPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/in-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_InPktsAny struct { + *ygot.NodePath } -// ProtocolOrigin returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "protocol-origin". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) ProtocolOrigin() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOrigin{ +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctets struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-labeled-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctetsAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPkts struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-labeled-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPktsAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctets represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctets struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctetsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-octets YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctetsAny struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutPkts represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutPkts struct { + *ygot.NodePath +} + +// NetworkInstance_SegmentRouting_TePolicy_Counters_OutPktsAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/state/counters/out-pkts YANG schema element. +type NetworkInstance_SegmentRouting_TePolicy_Counters_OutPktsAny struct { + *ygot.NodePath +} + +// InLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "in-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) InLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctets { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctets{ NodePath: ygot.NewNodePath( - []string{"state", "protocol-origin"}, + []string{"in-labeled-octets"}, map[string]interface{}{}, n, ), } } -// ProtocolOrigin returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "protocol-origin". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) ProtocolOrigin() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ProtocolOriginAny{ +// InLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "in-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) InLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "protocol-origin"}, + []string{"in-labeled-octets"}, map[string]interface{}{}, n, ), } } -// SegmentListAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) SegmentListAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny{ +// InLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "in-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) InLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPkts { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPkts{ NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": "*"}, + []string{"in-labeled-pkts"}, + map[string]interface{}{}, n, ), } } -// SegmentListAny returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) SegmentListAny() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny{ +// InLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "in-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) InLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InLabeledPktsAny{ NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": "*"}, + []string{"in-labeled-pkts"}, + map[string]interface{}{}, n, ), } } -// SegmentList returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) SegmentList(Id uint64) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList{ +// InOctets returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "in-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) InOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_InOctets { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InOctets{ NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": Id}, + []string{"in-octets"}, + map[string]interface{}{}, n, ), } } -// SegmentList returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "segment-list". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) SegmentList(Id uint64) *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny{ +// InOctets returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "in-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) InOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_InOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InOctetsAny{ NodePath: ygot.NewNodePath( - []string{"segment-lists", "segment-list"}, - map[string]interface{}{"id": Id}, + []string{"in-octets"}, + map[string]interface{}{}, n, ), } } -// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath the path struct for its child "valid". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_Valid{ +// InPkts returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "in-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) InPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_InPkts { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InPkts{ NodePath: ygot.NewNodePath( - []string{"state", "valid"}, + []string{"in-pkts"}, map[string]interface{}{}, n, ), } } -// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny the path struct for its child "valid". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePathAny) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_ValidAny{ +// InPkts returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "in-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) InPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_InPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_InPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "valid"}, + []string{"in-pkts"}, map[string]interface{}{}, n, ), } } -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/id YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/id YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/invalid-reason YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/invalid-reason YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/valid YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/valid YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight represents the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/weight YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight struct { - *ygot.NodePath -} - -// NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny represents the wildcard version of the /openconfig-network-instance/network-instances/network-instance/segment-routing/te-policies/te-policy/candidate-paths/candidate-path/segment-lists/segment-list/state/weight YANG schema element. -type NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny struct { - *ygot.NodePath -} - -// Id returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "id". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Id() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Id{ +// OutLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "out-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) OutLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctets { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctets{ NodePath: ygot.NewNodePath( - []string{"state", "id"}, + []string{"out-labeled-octets"}, map[string]interface{}{}, n, ), } } -// Id returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "id". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Id() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_IdAny{ +// OutLabeledOctets returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "out-labeled-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) OutLabeledOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "id"}, + []string{"out-labeled-octets"}, map[string]interface{}{}, n, ), } } -// InvalidReason returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "invalid-reason". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) InvalidReason() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReason{ +// OutLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "out-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) OutLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPkts { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPkts{ NodePath: ygot.NewNodePath( - []string{"state", "invalid-reason"}, + []string{"out-labeled-pkts"}, map[string]interface{}{}, n, ), } } -// InvalidReason returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "invalid-reason". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) InvalidReason() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_InvalidReasonAny{ +// OutLabeledPkts returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "out-labeled-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) OutLabeledPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutLabeledPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "invalid-reason"}, + []string{"out-labeled-pkts"}, map[string]interface{}{}, n, ), } } -// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "valid". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Valid{ +// OutOctets returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "out-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) OutOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctets { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctets{ NodePath: ygot.NewNodePath( - []string{"state", "valid"}, + []string{"out-octets"}, map[string]interface{}{}, n, ), } } -// Valid returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "valid". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Valid() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_ValidAny{ +// OutOctets returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "out-octets". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) OutOctets() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctetsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutOctetsAny{ NodePath: ygot.NewNodePath( - []string{"state", "valid"}, + []string{"out-octets"}, map[string]interface{}{}, n, ), } } -// Weight returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList the path struct for its child "weight". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList) Weight() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_Weight{ +// OutPkts returns from NetworkInstance_SegmentRouting_TePolicy_Counters the path struct for its child "out-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_Counters) OutPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutPkts { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutPkts{ NodePath: ygot.NewNodePath( - []string{"state", "weight"}, + []string{"out-pkts"}, map[string]interface{}{}, n, ), } } -// Weight returns from NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny the path struct for its child "weight". -func (n *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentListAny) Weight() *NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny { - return &NetworkInstance_SegmentRouting_TePolicy_CandidatePath_SegmentList_WeightAny{ +// OutPkts returns from NetworkInstance_SegmentRouting_TePolicy_CountersAny the path struct for its child "out-pkts". +func (n *NetworkInstance_SegmentRouting_TePolicy_CountersAny) OutPkts() *NetworkInstance_SegmentRouting_TePolicy_Counters_OutPktsAny { + return &NetworkInstance_SegmentRouting_TePolicy_Counters_OutPktsAny{ NodePath: ygot.NewNodePath( - []string{"state", "weight"}, + []string{"out-pkts"}, map[string]interface{}{}, n, ), @@ -156728,13 +156815,12 @@ func (n *RelayAgent_Dhcpv6_OptionsAny) EnableRemoteId() *RelayAgent_Dhcpv6_Optio // Root represents the /root YANG schema element. type Root struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Root { - return &Root{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Root{ygot.NewDeviceRootBase(id)} } // Acl returns from Root the path struct for its child "acl". diff --git a/exampleocpath/ocpath_augment.go b/exampleocpath/ocpath_augment.go index 3be54a3b8..3b1a7d8a2 100644 --- a/exampleocpath/ocpath_augment.go +++ b/exampleocpath/ocpath_augment.go @@ -1,6 +1,6 @@ package exampleocpath func (r *Root) WithName(name string) *Root { - r.customData["name"] = name + r.PutCustomData("name", name) return r } diff --git a/ygot/path_types.go b/ygot/path_types.go index f80dc7afe..0c8ad1ce6 100644 --- a/ygot/path_types.go +++ b/ygot/path_types.go @@ -14,7 +14,11 @@ package ygot -import gpb "github.com/openconfig/gnmi/proto/gnmi" +import ( + "fmt" + + gpb "github.com/openconfig/gnmi/proto/gnmi" +) const ( // PathStructInterfaceName is the name for the interface implemented by all @@ -23,6 +27,9 @@ const ( // PathBaseTypeName is the type name of the common embedded struct // containing the path information for a path struct. PathBaseTypeName = "NodePath" + // FakeRootBaseTypeName is the type name of the fake root struct which + // should be embedded within the fake root path struct. + FakeRootBaseTypeName = "DeviceRootBase" ) // PathStruct is an interface that is implemented by any generated path struct @@ -47,9 +54,46 @@ type NodePath struct { p PathStruct } -// ResolvePath is a helper which returns the root PathStruct and absolute path -// of a PathStruct node. -func ResolvePath(n PathStruct) (PathStruct, []*gpb.PathElem, []error) { +// fakeRootPathStruct is an interface that is implemented by the fake root path +// struct type. +type fakeRootPathStruct interface { + PathStruct + Id() string + CustomData() map[string]interface{} +} + +func NewDeviceRootBase(id string) *DeviceRootBase { + return &DeviceRootBase{NodePath: &NodePath{}, id: id, customData: map[string]interface{}{}} +} + +// DeviceRootBase represents the fakeroot for all YANG schema elements. +type DeviceRootBase struct { + *NodePath + id string + // customData is meant to store root-specific information that may be + // useful to know when processing the resolved path. It is meant to be + // accessible through a user-defined accessor. + customData map[string]interface{} +} + +// Id returns the device ID of the DeviceRootBase struct. +func (d *DeviceRootBase) Id() string { + return d.id +} + +// CustomData returns the customData field of the DeviceRootBase struct. +func (d *DeviceRootBase) CustomData() map[string]interface{} { + return d.customData +} + +// PutCustomData modifies an entry in the customData field of the DeviceRootBase struct. +func (d *DeviceRootBase) PutCustomData(key string, val interface{}) { + d.customData[key] = val +} + +// ResolvePath is a helper which returns the resolved *gpb.Path of a PathStruct +// node as well as the root node's customData. +func ResolvePath(n PathStruct) (*gpb.Path, map[string]interface{}, []error) { var p []*gpb.PathElem var errs []error for ; n.parent() != nil; n = n.parent() { @@ -63,7 +107,12 @@ func ResolvePath(n PathStruct) (PathStruct, []*gpb.PathElem, []error) { if errs != nil { return nil, nil, errs } - return n, p, nil + + root, ok := n.(fakeRootPathStruct) + if !ok { + return nil, nil, append(errs, fmt.Errorf("ygot.ResolvePath(ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) + } + return &gpb.Path{Target: root.Id(), Elem: p}, root.CustomData(), nil } // ResolveRelPath returns the partial []*gpb.PathElem representing the diff --git a/ygot/path_types_test.go b/ygot/path_types_test.go index 546eb2674..fe5e18136 100644 --- a/ygot/path_types_test.go +++ b/ygot/path_types_test.go @@ -21,14 +21,20 @@ import ( "google.golang.org/protobuf/proto" ) +type deviceRoot struct { + *DeviceRootBase +} + func TestResolvePath(t *testing.T) { - root := &NodePath{} + wantId := "FOO" + wantCustomData := map[string]interface{}{"foo": "bar"} + root := deviceRoot{NewDeviceRootBase(wantId)} + root.PutCustomData("foo", "bar") tests := []struct { name string in PathStruct wantPathStr string - wantRoot PathStruct wantErr bool }{{ name: "simple", @@ -42,12 +48,10 @@ func TestResolvePath(t *testing.T) { }, }, wantPathStr: "/parent/child", - wantRoot: root, }, { name: "root", in: root, wantPathStr: "/", - wantRoot: root, }, { name: "list", in: &NodePath{ @@ -60,7 +64,6 @@ func TestResolvePath(t *testing.T) { }, }, wantPathStr: "/parent/values/value[ID=5]", - wantRoot: root, }, { name: "list with unconvertible key value", in: &NodePath{ @@ -73,31 +76,33 @@ func TestResolvePath(t *testing.T) { }, }, wantPathStr: "", - wantRoot: nil, wantErr: true, }} for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - wantP, err := StringToStructuredPath(tt.wantPathStr) + wantPath, err := StringToStructuredPath(tt.wantPathStr) if err != nil { t.Fatal(err) } - wantPath := wantP.Elem + wantPath.Target = wantId - gotRoot, gotPath, gotErrs := ResolvePath(tt.in) + gotPath, gotCustomData, gotErrs := ResolvePath(tt.in) if gotErrs != nil && !tt.wantErr { t.Fatal(gotErrs) } else if gotErrs == nil && tt.wantErr { t.Fatal("expected error but did not receive any") } - - if gotRoot != tt.wantRoot { - t.Errorf("root not expected - got: %v, want: %v", gotRoot, tt.wantRoot) + if gotErrs != nil { + return } if diff := cmp.Diff(wantPath, gotPath, cmp.Comparer(proto.Equal)); diff != "" { - t.Errorf("ResolvePath returned diff (-want +got):\n%s", diff) + t.Errorf("ResolvePath returned diff (-want, +got):\n%s", diff) + } + + if diff := cmp.Diff(wantCustomData, gotCustomData); diff != "" { + t.Errorf("ResolvePath: customData is not same as expected (-want, +got)\n%s", diff) } }) } diff --git a/ypathgen/generator/generator_test.go b/ypathgen/generator/generator_test.go index 0e608598e..4e03f5212 100644 --- a/ypathgen/generator/generator_test.go +++ b/ypathgen/generator/generator_test.go @@ -31,7 +31,6 @@ func TestWritePathCode(t *testing.T) { name: "simple", in: &ypathgen.GeneratedPathCode{ CommonHeader: "path common header\n", - OneOffHeader: "\npath one-off header\n", Structs: []ypathgen.GoPathStructCodeSnippet{{ PathStructName: "PathStructName", StructBase: "\nStructDef\n", @@ -40,8 +39,6 @@ func TestWritePathCode(t *testing.T) { }, want: `path common header -path one-off header - StructDef ChildConstructor diff --git a/ypathgen/path_tests/path_test.go b/ypathgen/path_tests/path_test.go index db8cd635d..5c43dce00 100644 --- a/ypathgen/path_tests/path_test.go +++ b/ypathgen/path_tests/path_test.go @@ -32,7 +32,7 @@ const deviceId = "dev" // verifyPath checks the given path against expected. func verifyPath(t *testing.T, p ygot.PathStruct, wantPathStr string) { t.Helper() - gotPath, _, errs := ocp.Resolve(p) + gotPath, _, errs := ygot.ResolvePath(p) if errs != nil { t.Fatal(errs) } @@ -53,11 +53,11 @@ func verifyPath(t *testing.T, p ygot.PathStruct, wantPathStr string) { // be the non-wildcard version of the path struct. func verifyTypesEqual(t *testing.T, target ygot.PathStruct, wild ygot.PathStruct, equal bool) { t.Helper() - targetPathProto, _, errs := ocp.Resolve(target) + targetPathProto, _, errs := ygot.ResolvePath(target) if errs != nil { t.Fatal(errs) } - wildPathProto, _, errs := ocp.Resolve(wild) + wildPathProto, _, errs := ygot.ResolvePath(wild) if errs != nil { t.Fatal(errs) } @@ -90,7 +90,7 @@ func TestCustomData(t *testing.T) { p := root.WithName("foo").Interface("eth1").Ethernet().PortSpeed() verifyPath(t, p, "/interfaces/interface[name=eth1]/ethernet/state/port-speed") - _, customData, _ := ocp.Resolve(p) + _, customData, _ := ygot.ResolvePath(p) if diff := cmp.Diff(map[string]interface{}{"name": "foo"}, customData); diff != "" { t.Errorf("resolved customData for root does not match (-want, +got):\n%s", diff) } diff --git a/ypathgen/pathgen.go b/ypathgen/pathgen.go index d7ccf0e69..5cb3f4121 100644 --- a/ypathgen/pathgen.go +++ b/ypathgen/pathgen.go @@ -149,9 +149,7 @@ type GoImports struct { // code are listed below: // 1. Struct definitions for each container, list, or leaf schema node, // as well as the fakeroot. -// 2. A Resolve() helper function, which can return the absolute path of -// any struct. -// 3. Next-level methods for the fakeroot and each non-leaf schema node, +// 2. Next-level methods for the fakeroot and each non-leaf schema node, // which instantiate and return the next-level structs corresponding to // its child schema nodes. // With these components, the generated API is able to support absolute path @@ -246,7 +244,6 @@ func (cg *GenConfig) GeneratePathCode(yangFiles, includePaths []string) (*Genera type GeneratedPathCode struct { Structs []GoPathStructCodeSnippet // Structs is the generated set of structs representing containers or lists in the input YANG models. CommonHeader string // CommonHeader is the header that should be used for all output Go files. - OneOffHeader string // OneOffHeader defines the header that should be included in only one output Go file - such as package init statements. } // String method for GeneratedPathCode, which can be used to write all the @@ -254,7 +251,6 @@ type GeneratedPathCode struct { func (genCode GeneratedPathCode) String() string { var gotCode strings.Builder gotCode.WriteString(genCode.CommonHeader) - gotCode.WriteString(genCode.OneOffHeader) for _, gotStruct := range genCode.Structs { gotCode.WriteString(gotStruct.String()) } @@ -276,7 +272,6 @@ func (genCode GeneratedPathCode) SplitFiles(fileN int) ([]string, error) { structsPerFile := structN / fileN var gotCode strings.Builder gotCode.WriteString(genCode.CommonHeader) - gotCode.WriteString(genCode.OneOffHeader) for i, gotStruct := range genCode.Structs { // The last file contains the remainder of the structs. @@ -381,51 +376,25 @@ Imported modules were sourced from: package {{ .PackageName }} import ( - "fmt" - - gpb "{{ .GNMIProtoPath }}" {{ .SchemaStructPkgAlias }} "{{ .SchemaStructPkgPath }}" "{{ .YgotImportPath }}" ) -`) - - // goPathOneOffHeaderTemplate defines the template for package code that should - // be output in only one file. - goPathOneOffHeaderTemplate = mustTemplate("oneoffHeader", ` -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.{{ .PathStructInterfaceName }}) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*{{ .FakeRootTypeName }}) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.{{ .PathStructInterfaceName }}): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} `) // goPathFakeRootTemplate defines a template for the type definition and // basic methods of the fakeroot object. The fakeroot object adheres to - // the methods of PathStructInterfaceName in order to allow its path - // struct descendents to use the Resolve() helper function for - // obtaining their absolute paths. - // - // customData is meant to store root-specific information that may be - // useful to know when processing the resolved path. It is meant to be - // accessible through a user-defined accessor. + // the methods of PathStructInterfaceName and FakeRootBaseTypeName in + // order to allow its path struct descendents to use the ygot.Resolve() + // helper function for obtaining their absolute paths. goPathFakeRootTemplate = mustTemplate("fakeroot", ` // {{ .TypeName }} represents the {{ .YANGPath }} YANG schema element. type {{ .TypeName }} struct { - *ygot.{{ .PathBaseTypeName }} - id string - customData map[string]interface{} + *ygot.{{ .FakeRootBaseTypeName }} } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *{{ .TypeName }} { - return &{{ .TypeName }}{ {{- .PathBaseTypeName }}: &ygot.{{ .PathBaseTypeName }}{}, id: id, customData: map[string]interface{}{}} + return &{{ .TypeName }}{ygot.New{{- .FakeRootBaseTypeName }}(id)} } `) @@ -580,13 +549,7 @@ func writeHeader(yangFiles, includePaths []string, cg *GenConfig, genCode *Gener return err } - var oneoff strings.Builder - if err := goPathOneOffHeaderTemplate.Execute(&oneoff, s); err != nil { - return err - } - genCode.CommonHeader = common.String() - genCode.OneOffHeader = oneoff.String() return nil } @@ -601,6 +564,9 @@ type goPathStructData struct { PathBaseTypeName string // PathStructInterfaceName is the name of the interface which all path structs implement. PathStructInterfaceName string + // FakeRootBaseTypeName is the type name of the fake root struct which + // should be embedded within the fake root path struct. + FakeRootBaseTypeName string // WildcardSuffix is the suffix given to the wildcard versions of // each node that distinguishes each from its non-wildcard counterpart. WildcardSuffix string @@ -614,6 +580,7 @@ func getStructData(directory *ygen.Directory) goPathStructData { TypeName: directory.Name, YANGPath: util.SlicePathToString(directory.Path), PathBaseTypeName: ygot.PathBaseTypeName, + FakeRootBaseTypeName: ygot.FakeRootBaseTypeName, PathStructInterfaceName: ygot.PathStructInterfaceName, WildcardSuffix: WildcardSuffix, } diff --git a/ypathgen/pathgen_test.go b/ypathgen/pathgen_test.go index 06c3f0f87..91fb1106e 100644 --- a/ypathgen/pathgen_test.go +++ b/ypathgen/pathgen_test.go @@ -1410,13 +1410,12 @@ func (n *ContainerWithConfigAny) Leaflist2() *ContainerWithConfig_Leaflist2Any { StructBase: ` // Root represents the /root YANG schema element. type Root struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Root { - return &Root{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Root{ygot.NewDeviceRootBase(id)} } // Leaf represents the /root-module/leaf YANG schema element. diff --git a/ypathgen/testdata/structs/choice-case-example.path-txt b/ypathgen/testdata/structs/choice-case-example.path-txt index 9bd62b467..b7850a936 100644 --- a/ypathgen/testdata/structs/choice-case-example.path-txt +++ b/ypathgen/testdata/structs/choice-case-example.path-txt @@ -11,27 +11,10 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // ChoiceCaseAnonymousCase represents the /choice-case-example/choice-case-anonymous-case YANG schema element. type ChoiceCaseAnonymousCase struct { *ygot.NodePath @@ -182,13 +165,12 @@ func (n *ChoiceCaseWithLeafrefAny) Referenced() *ChoiceCaseWithLeafref_Reference // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // ChoiceCaseAnonymousCase returns from Device the path struct for its child "choice-case-anonymous-case". diff --git a/ypathgen/testdata/structs/enum-module.path-txt b/ypathgen/testdata/structs/enum-module.path-txt index f641a503a..7d3135643 100644 --- a/ypathgen/testdata/structs/enum-module.path-txt +++ b/ypathgen/testdata/structs/enum-module.path-txt @@ -11,27 +11,10 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // AList represents the /enum-module/a-lists/a-list YANG schema element. type AList struct { *ygot.NodePath @@ -160,13 +143,12 @@ func (n *CAny) Cl() *C_ClAny { // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // AListAny returns from Device the path struct for its child "a-list". diff --git a/ypathgen/testdata/structs/openconfig-augmented.path-txt b/ypathgen/testdata/structs/openconfig-augmented.path-txt index 63a0c4f28..22f8d15f5 100644 --- a/ypathgen/testdata/structs/openconfig-augmented.path-txt +++ b/ypathgen/testdata/structs/openconfig-augmented.path-txt @@ -12,36 +12,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Native returns from Device the path struct for its child "native". diff --git a/ypathgen/testdata/structs/openconfig-camelcase.path-txt b/ypathgen/testdata/structs/openconfig-camelcase.path-txt index 2b5bc7ee8..461e0cfcd 100644 --- a/ypathgen/testdata/structs/openconfig-camelcase.path-txt +++ b/ypathgen/testdata/structs/openconfig-camelcase.path-txt @@ -11,27 +11,10 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // BGP represents the /openconfig-camelcase/bgp YANG schema element. type BGP struct { *ygot.NodePath @@ -130,13 +113,12 @@ func (n *BGP_NeighborAny) PeerIP() *BGP_Neighbor_PeerIPAny { // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // BGP returns from Device the path struct for its child "bgp". diff --git a/ypathgen/testdata/structs/openconfig-enumcamelcase.path-txt b/ypathgen/testdata/structs/openconfig-enumcamelcase.path-txt index 6836ea9fb..e81edbddf 100644 --- a/ypathgen/testdata/structs/openconfig-enumcamelcase.path-txt +++ b/ypathgen/testdata/structs/openconfig-enumcamelcase.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Foo returns from Device the path struct for its child "foo". diff --git a/ypathgen/testdata/structs/openconfig-simple-0.path-txt b/ypathgen/testdata/structs/openconfig-simple-0.path-txt index 3e8d8770d..432cedcec 100644 --- a/ypathgen/testdata/structs/openconfig-simple-0.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-0.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Parent returns from Device the path struct for its child "parent". diff --git a/ypathgen/testdata/structs/openconfig-simple-1.path-txt b/ypathgen/testdata/structs/openconfig-simple-1.path-txt index 14e43610a..bf326ecf1 100644 --- a/ypathgen/testdata/structs/openconfig-simple-1.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-1.path-txt @@ -11,9 +11,6 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) diff --git a/ypathgen/testdata/structs/openconfig-simple-30.path-txt b/ypathgen/testdata/structs/openconfig-simple-30.path-txt index 0dd44fb34..41ec96f21 100644 --- a/ypathgen/testdata/structs/openconfig-simple-30.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-30.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Parent returns from Device the path struct for its child "parent". diff --git a/ypathgen/testdata/structs/openconfig-simple-31.path-txt b/ypathgen/testdata/structs/openconfig-simple-31.path-txt index f43c4b1de..b4c572d5b 100644 --- a/ypathgen/testdata/structs/openconfig-simple-31.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-31.path-txt @@ -11,9 +11,6 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) diff --git a/ypathgen/testdata/structs/openconfig-simple-32.path-txt b/ypathgen/testdata/structs/openconfig-simple-32.path-txt index 14e43610a..bf326ecf1 100644 --- a/ypathgen/testdata/structs/openconfig-simple-32.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-32.path-txt @@ -11,9 +11,6 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) diff --git a/ypathgen/testdata/structs/openconfig-simple-40.path-txt b/ypathgen/testdata/structs/openconfig-simple-40.path-txt index 0dd44fb34..41ec96f21 100644 --- a/ypathgen/testdata/structs/openconfig-simple-40.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-40.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Parent returns from Device the path struct for its child "parent". diff --git a/ypathgen/testdata/structs/openconfig-simple-41.path-txt b/ypathgen/testdata/structs/openconfig-simple-41.path-txt index f43c4b1de..b4c572d5b 100644 --- a/ypathgen/testdata/structs/openconfig-simple-41.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-41.path-txt @@ -11,9 +11,6 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) diff --git a/ypathgen/testdata/structs/openconfig-simple-42.path-txt b/ypathgen/testdata/structs/openconfig-simple-42.path-txt index edc5e6ada..42f2747ae 100644 --- a/ypathgen/testdata/structs/openconfig-simple-42.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-42.path-txt @@ -11,9 +11,6 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) diff --git a/ypathgen/testdata/structs/openconfig-simple-43.path-txt b/ypathgen/testdata/structs/openconfig-simple-43.path-txt index f9d4b36de..9bb4f4ab7 100644 --- a/ypathgen/testdata/structs/openconfig-simple-43.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-43.path-txt @@ -11,9 +11,6 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) diff --git a/ypathgen/testdata/structs/openconfig-simple-intendedconfig.path-txt b/ypathgen/testdata/structs/openconfig-simple-intendedconfig.path-txt index 6c3e9a62f..2a871ec5a 100644 --- a/ypathgen/testdata/structs/openconfig-simple-intendedconfig.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple-intendedconfig.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Parent returns from Device the path struct for its child "parent". diff --git a/ypathgen/testdata/structs/openconfig-simple.path-txt b/ypathgen/testdata/structs/openconfig-simple.path-txt index a7d1e8628..2055e5adf 100644 --- a/ypathgen/testdata/structs/openconfig-simple.path-txt +++ b/ypathgen/testdata/structs/openconfig-simple.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Parent returns from Device the path struct for its child "parent". diff --git a/ypathgen/testdata/structs/openconfig-unione.path-txt b/ypathgen/testdata/structs/openconfig-unione.path-txt index 405013277..dc000744c 100644 --- a/ypathgen/testdata/structs/openconfig-unione.path-txt +++ b/ypathgen/testdata/structs/openconfig-unione.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // DupEnum returns from Device the path struct for its child "dup-enum". diff --git a/ypathgen/testdata/structs/openconfig-withlist-builder.path-txt b/ypathgen/testdata/structs/openconfig-withlist-builder.path-txt index 5f0fb1aac..03ce926e2 100644 --- a/ypathgen/testdata/structs/openconfig-withlist-builder.path-txt +++ b/ypathgen/testdata/structs/openconfig-withlist-builder.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Model returns from Device the path struct for its child "model". diff --git a/ypathgen/testdata/structs/openconfig-withlist.path-txt b/ypathgen/testdata/structs/openconfig-withlist.path-txt index 3cf7e56ad..eff5c2adb 100644 --- a/ypathgen/testdata/structs/openconfig-withlist.path-txt +++ b/ypathgen/testdata/structs/openconfig-withlist.path-txt @@ -11,36 +11,18 @@ Imported modules were sourced from: package ocpathstructs import ( - "fmt" - - gpb "github.com/openconfig/gnmi/proto/gnmi" oc "github.com/openconfig/ygot/ypathgen/testdata/exampleoc" "github.com/openconfig/ygot/ygot" ) -// Resolve is a helper which returns the resolved *gpb.Path of a PathStruct node. -func Resolve(n ygot.PathStruct) (*gpb.Path, map[string]interface{}, []error) { - n, p, errs := ygot.ResolvePath(n) - root, ok := n.(*Device) - if !ok { - errs = append(errs, fmt.Errorf("Resolve(n ygot.PathStruct): got unexpected root of (type, value) (%T, %v)", n, n)) - } - - if errs != nil { - return nil, nil, errs - } - return &gpb.Path{Target: root.id, Elem: p}, root.customData, nil -} - // Device represents the /device YANG schema element. type Device struct { - *ygot.NodePath - id string - customData map[string]interface{} + *ygot.DeviceRootBase } +// DeviceRoot returns a new path object from which YANG paths can be constructed. func DeviceRoot(id string) *Device { - return &Device{NodePath: &ygot.NodePath{}, id: id, customData: map[string]interface{}{}} + return &Device{ygot.NewDeviceRootBase(id)} } // Model returns from Device the path struct for its child "model".