Newer
Older
/*
Package tapi is a generated package which contains definitions
of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was false
in this case).
This package was generated by /Users/mk/go/pkg/mod/github.com/openconfig/ygot@v0.8.7/genutil/names.go
using the following YANG input files:
- ../../models/tapi-topology@2019-03-31.yang
- ../../models/tapi-connectivity@2019-03-31.yang
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
Imported modules were sourced from:
- ../../yang/...
*/
package tapi
import (
"encoding/json"
"fmt"
"reflect"
"github.com/openconfig/ygot/ygot"
"github.com/openconfig/goyang/pkg/yang"
"github.com/openconfig/ygot/ytypes"
)
// Binary is a type that is used for fields that have a YANG type of
// binary. It is used such that binary fields can be distinguished from
// leaf-lists of uint8s (which are mapped to []uint8, equivalent to
// []byte in reflection).
type Binary []byte
// YANGEmpty is a type that is used for fields that have a YANG type of
// empty. It is used such that empty fields can be distinguished from boolean fields
// in the generated code.
type YANGEmpty bool
var (
SchemaTree map[string]*yang.Entry
)
func init() {
var err error
if SchemaTree, err = UnzipSchema(); err != nil {
panic("schema error: " + err.Error())
}
}
// Schema returns the details of the generated schema.
func Schema() (*ytypes.Schema, error) {
uzp, err := UnzipSchema()
if err != nil {
return nil, fmt.Errorf("cannot unzip schema, %v", err)
}
return &ytypes.Schema{
Root: &Device{},
SchemaTree: uzp,
Unmarshal: Unmarshal,
}, nil
}
// UnzipSchema unzips the zipped schema and returns a map of yang.Entry nodes,
// keyed by the name of the struct that the yang.Entry describes the schema for.
func UnzipSchema() (map[string]*yang.Entry, error) {
var schemaTree map[string]*yang.Entry
var err error
if schemaTree, err = ygot.GzipToSchema(ySchema); err != nil {
return nil, fmt.Errorf("could not unzip the schema; %v", err)
}
return schemaTree, nil
}
// Unmarshal unmarshals data, which must be RFC7951 JSON format, into
// destStruct, which must be non-nil and the correct GoStruct type. It returns
// an error if the destStruct is not found in the schema or the data cannot be
// unmarshaled. The supplied options (opts) are used to control the behaviour
// of the unmarshal function - for example, determining whether errors are
// thrown for unknown fields in the input JSON.
func Unmarshal(data []byte, destStruct ygot.GoStruct, opts ...ytypes.UnmarshalOpt) error {
tn := reflect.TypeOf(destStruct).Elem().Name()
schema, ok := SchemaTree[tn]
if !ok {
return fmt.Errorf("could not find schema for type %s", tn )
}
var jsonTree interface{}
if err := json.Unmarshal([]byte(data), &jsonTree); err != nil {
return err
}
return ytypes.Unmarshal(schema, destStruct, jsonTree, opts...)
}
// Device represents the /device YANG schema element.
type Device struct {
Context *TapiCommon_Context `path:"context" module:"tapi-common"`
}
// IsYANGGoStruct ensures that Device implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*Device) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *Device) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["Device"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *Device) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context represents the /tapi-common/context YANG schema element.
type TapiCommon_Context struct {
ConnectivityContext *TapiCommon_Context_ConnectivityContext `path:"connectivity-context" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_Name `path:"name" module:"tapi-common"`
PathComputationContext *TapiCommon_Context_PathComputationContext `path:"path-computation-context" module:"tapi-path-computation"`
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
ServiceInterfacePoint map[string]*TapiCommon_Context_ServiceInterfacePoint `path:"service-interface-point" module:"tapi-common"`
TopologyContext *TapiCommon_Context_TopologyContext `path:"topology-context" module:"tapi-topology"`
Uuid *string `path:"uuid" module:"tapi-common"`
}
// IsYANGGoStruct ensures that TapiCommon_Context implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context) NewName(ValueName string) (*TapiCommon_Context_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// NewServiceInterfacePoint creates a new entry in the ServiceInterfacePoint list of the
// TapiCommon_Context struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context) NewServiceInterfacePoint(Uuid string) (*TapiCommon_Context_ServiceInterfacePoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ServiceInterfacePoint == nil {
t.ServiceInterfacePoint = make(map[string]*TapiCommon_Context_ServiceInterfacePoint)
}
key := Uuid
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.ServiceInterfacePoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ServiceInterfacePoint", key)
}
t.ServiceInterfacePoint[key] = &TapiCommon_Context_ServiceInterfacePoint{
Uuid: &Uuid,
}
return t.ServiceInterfacePoint[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext represents the /tapi-common/context/connectivity-context YANG schema element.
type TapiCommon_Context_ConnectivityContext struct {
Connection map[string]*TapiCommon_Context_ConnectivityContext_Connection `path:"connection" module:"tapi-connectivity"`
ConnectivityService map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService `path:"connectivity-service" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext) IsYANGGoStruct() {}
// NewConnection creates a new entry in the Connection list of the
// TapiCommon_Context_ConnectivityContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext) NewConnection(Uuid string) (*TapiCommon_Context_ConnectivityContext_Connection, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Connection == nil {
t.Connection = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection)
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
key := Uuid
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Connection[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Connection", key)
}
t.Connection[key] = &TapiCommon_Context_ConnectivityContext_Connection{
Uuid: &Uuid,
}
return t.Connection[key], nil
}
// NewConnectivityService creates a new entry in the ConnectivityService list of the
// TapiCommon_Context_ConnectivityContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext) NewConnectivityService(Uuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ConnectivityService == nil {
t.ConnectivityService = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService)
}
key := Uuid
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.ConnectivityService[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ConnectivityService", key)
}
t.ConnectivityService[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService{
Uuid: &Uuid,
}
return t.ConnectivityService[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection represents the /tapi-common/context/connectivity-context/connection YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection struct {
BoundingNode *TapiCommon_Context_ConnectivityContext_Connection_BoundingNode `path:"bounding-node" module:"tapi-connectivity"`
ConnectionEndPoint map[TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint `path:"connection-end-point" module:"tapi-connectivity"`
Direction E_TapiConnectivity_ForwardingDirection `path:"direction" module:"tapi-connectivity"`
LayerProtocolName E_TapiConnectivity_LayerProtocolName `path:"layer-protocol-name" module:"tapi-connectivity"`
LifecycleState E_TapiCommon_LifecycleState `path:"lifecycle-state" module:"tapi-connectivity"`
LowerConnection map[string]*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection `path:"lower-connection" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_Name `path:"name" module:"tapi-connectivity"`
OperationalState E_TapiCommon_OperationalState `path:"operational-state" module:"tapi-connectivity"`
Route map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route `path:"route" module:"tapi-connectivity"`
SupportedClientLink map[TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key]*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink `path:"supported-client-link" module:"tapi-connectivity"`
SwitchControl map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl `path:"switch-control" module:"tapi-connectivity"`
Uuid *string `path:"uuid" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key represents the key for list ConnectionEndPoint of element /tapi-common/context/connectivity-context/connection.
type TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key struct {
TopologyUuid string `path:"topology-uuid"`
NodeUuid string `path:"node-uuid"`
NodeEdgePointUuid string `path:"node-edge-point-uuid"`
ConnectionEndPointUuid string `path:"connection-end-point-uuid"`
}
// TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key represents the key for list SupportedClientLink of element /tapi-common/context/connectivity-context/connection.
type TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key struct {
TopologyUuid string `path:"topology-uuid"`
LinkUuid string `path:"link-uuid"`
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
// NewConnectionEndPoint creates a new entry in the ConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ConnectionEndPoint == nil {
t.ConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint)
}
key := TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint_Key{
TopologyUuid: TopologyUuid,
NodeUuid: NodeUuid,
NodeEdgePointUuid: NodeEdgePointUuid,
ConnectionEndPointUuid: ConnectionEndPointUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.ConnectionEndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ConnectionEndPoint", key)
}
t.ConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint{
TopologyUuid: &TopologyUuid,
NodeUuid: &NodeUuid,
NodeEdgePointUuid: &NodeEdgePointUuid,
ConnectionEndPointUuid: &ConnectionEndPointUuid,
}
return t.ConnectionEndPoint[key], nil
}
// NewLowerConnection creates a new entry in the LowerConnection list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewLowerConnection(ConnectionUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LowerConnection == nil {
t.LowerConnection = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection)
}
key := ConnectionUuid
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LowerConnection[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LowerConnection", key)
}
t.LowerConnection[key] = &TapiCommon_Context_ConnectivityContext_Connection_LowerConnection{
ConnectionUuid: &ConnectionUuid,
}
return t.LowerConnection[key], nil
}
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
// NewRoute creates a new entry in the Route list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewRoute(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_Route, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Route == nil {
t.Route = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route)
}
key := LocalId
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Route[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Route", key)
}
t.Route[key] = &TapiCommon_Context_ConnectivityContext_Connection_Route{
LocalId: &LocalId,
}
return t.Route[key], nil
}
// NewSupportedClientLink creates a new entry in the SupportedClientLink list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewSupportedClientLink(TopologyUuid string, LinkUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SupportedClientLink == nil {
t.SupportedClientLink = make(map[TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key]*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink)
}
key := TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink_Key{
TopologyUuid: TopologyUuid,
LinkUuid: LinkUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SupportedClientLink[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SupportedClientLink", key)
}
t.SupportedClientLink[key] = &TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink{
TopologyUuid: &TopologyUuid,
LinkUuid: &LinkUuid,
}
return t.SupportedClientLink[key], nil
}
// NewSwitchControl creates a new entry in the SwitchControl list of the
// TapiCommon_Context_ConnectivityContext_Connection struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection) NewSwitchControl(Uuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SwitchControl == nil {
t.SwitchControl = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl)
}
key := Uuid
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SwitchControl[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SwitchControl", key)
}
t.SwitchControl[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl{
Uuid: &Uuid,
}
return t.SwitchControl[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_BoundingNode represents the /tapi-common/context/connectivity-context/connection/bounding-node YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_BoundingNode struct {
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_BoundingNode implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_BoundingNode) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_BoundingNode) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_BoundingNode"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_BoundingNode) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint struct {
ConnectionEndPointUuid *string `path:"connection-end-point-uuid" module:"tapi-connectivity"`
NodeEdgePointUuid *string `path:"node-edge-point-uuid" module:"tapi-connectivity"`
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
func (*TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionEndPointUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
}
if t.NodeEdgePointUuid == nil {
return nil, fmt.Errorf("nil value for key NodeEdgePointUuid")
}
if t.NodeUuid == nil {
return nil, fmt.Errorf("nil value for key NodeUuid")
}
if t.TopologyUuid == nil {
return nil, fmt.Errorf("nil value for key TopologyUuid")
}
return map[string]interface{}{
"connection-end-point-uuid": *t.ConnectionEndPointUuid,
"node-edge-point-uuid": *t.NodeEdgePointUuid,
"node-uuid": *t.NodeUuid,
"topology-uuid": *t.TopologyUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_ConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_LowerConnection represents the /tapi-common/context/connectivity-context/connection/lower-connection YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_LowerConnection struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_LowerConnection implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_LowerConnection) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_LowerConnection struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_LowerConnection) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
"connection-uuid": *t.ConnectionUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_LowerConnection) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_LowerConnection"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_LowerConnection) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_Name represents the /tapi-common/context/connectivity-context/connection/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_Route represents the /tapi-common/context/connectivity-context/connection/route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route struct {
ConnectionEndPoint map[TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint `path:"connection-end-point" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route_Name `path:"name" module:"tapi-connectivity"`
ResilienceRoute *TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute `path:"resilience-route" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_Route) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key represents the key for list ConnectionEndPoint of element /tapi-common/context/connectivity-context/connection/route.
type TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key struct {
TopologyUuid string `path:"topology-uuid"`
NodeUuid string `path:"node-uuid"`
NodeEdgePointUuid string `path:"node-edge-point-uuid"`
ConnectionEndPointUuid string `path:"connection-end-point-uuid"`
// NewConnectionEndPoint creates a new entry in the ConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection_Route struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ConnectionEndPoint == nil {
t.ConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint)
key := TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint_Key{
TopologyUuid: TopologyUuid,
NodeUuid: NodeUuid,
NodeEdgePointUuid: NodeEdgePointUuid,
ConnectionEndPointUuid: ConnectionEndPointUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.ConnectionEndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ConnectionEndPoint", key)
t.ConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint{
TopologyUuid: &TopologyUuid,
NodeUuid: &NodeUuid,
NodeEdgePointUuid: &NodeEdgePointUuid,
ConnectionEndPointUuid: &ConnectionEndPointUuid,
return t.ConnectionEndPoint[key], nil
}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_Route struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_Route_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_Route_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_Route_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Route struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}
return map[string]interface{}{
"local-id": *t.LocalId,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/route/connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint struct {
ConnectionEndPointUuid *string `path:"connection-end-point-uuid" module:"tapi-connectivity"`
NodeEdgePointUuid *string `path:"node-edge-point-uuid" module:"tapi-connectivity"`
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionEndPointUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
if t.NodeEdgePointUuid == nil {
return nil, fmt.Errorf("nil value for key NodeEdgePointUuid")
if t.NodeUuid == nil {
return nil, fmt.Errorf("nil value for key NodeUuid")
}
if t.TopologyUuid == nil {
return nil, fmt.Errorf("nil value for key TopologyUuid")
}
return map[string]interface{}{
"connection-end-point-uuid": *t.ConnectionEndPointUuid,
"node-edge-point-uuid": *t.NodeEdgePointUuid,
"node-uuid": *t.NodeUuid,
"topology-uuid": *t.TopologyUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_Route_Name represents the /tapi-common/context/connectivity-context/connection/route/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_Route_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_Route_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute represents the /tapi-common/context/connectivity-context/connection/route/resilience-route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
RouteState E_TapiConnectivity_RouteState `path:"route-state" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
func (*TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_Route_ResilienceRoute) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink represents the /tapi-common/context/connectivity-context/connection/supported-client-link YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink struct {
LinkUuid *string `path:"link-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink) ΛListKeyMap() (map[string]interface{}, error) {
if t.LinkUuid == nil {
return nil, fmt.Errorf("nil value for key LinkUuid")
}
if t.TopologyUuid == nil {
return nil, fmt.Errorf("nil value for key TopologyUuid")
}
return map[string]interface{}{
"topology-uuid": *t.TopologyUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
func (t *TapiCommon_Context_ConnectivityContext_Connection_SupportedClientLink) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl represents the /tapi-common/context/connectivity-context/connection/switch-control YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct {
FaultConditionDetermination E_TapiConnectivity_FaultConditionDetermination `path:"fault-condition-determination" module:"tapi-connectivity"`
HoldOffTime *uint64 `path:"hold-off-time" module:"tapi-connectivity"`
IsCoordinatedSwitchingBothEnds *bool `path:"is-coordinated-switching-both-ends" module:"tapi-connectivity"`
IsFrozen *bool `path:"is-frozen" module:"tapi-connectivity"`
IsLockOut *bool `path:"is-lock-out" module:"tapi-connectivity"`
MaxSwitchTimes *uint64 `path:"max-switch-times" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name `path:"name" module:"tapi-connectivity"`
PreferredRestorationLayer []E_TapiConnectivity_LayerProtocolName `path:"preferred-restoration-layer" module:"tapi-connectivity"`
ResilienceType *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType `path:"resilience-type" module:"tapi-connectivity"`
ResiliencyRouteConstraint map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint `path:"resiliency-route-constraint" module:"tapi-connectivity"`
RestorationCoordinateType E_TapiConnectivity_CoordinateType `path:"restoration-coordinate-type" module:"tapi-connectivity"`
RestorePriority *uint64 `path:"restore-priority" module:"tapi-connectivity"`
ReversionMode E_TapiConnectivity_ReversionMode `path:"reversion-mode" module:"tapi-connectivity"`
SelectionControl E_TapiConnectivity_SelectionControl `path:"selection-control" module:"tapi-connectivity"`
SubSwitchControl map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl `path:"sub-switch-control" module:"tapi-connectivity"`
Switch map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch `path:"switch" module:"tapi-connectivity"`
Uuid *string `path:"uuid" module:"tapi-connectivity"`
WaitToRevertTime *uint64 `path:"wait-to-revert-time" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key represents the key for list SubSwitchControl of element /tapi-common/context/connectivity-context/connection/switch-control.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key struct {
ConnectionUuid string `path:"connection-uuid"`
SwitchControlUuid string `path:"switch-control-uuid"`
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name{
ValueName: &ValueName,
// NewResiliencyRouteConstraint creates a new entry in the ResiliencyRouteConstraint list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewResiliencyRouteConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ResiliencyRouteConstraint == nil {
t.ResiliencyRouteConstraint = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.ResiliencyRouteConstraint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list ResiliencyRouteConstraint", key)
t.ResiliencyRouteConstraint[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint{
LocalId: &LocalId,
return t.ResiliencyRouteConstraint[key], nil
// NewSubSwitchControl creates a new entry in the SubSwitchControl list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input