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
- ../../models/tapi-common@2019-03-31.yang
- ../../models/tapi-photonic-media@2019-03-31.yang
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
117
118
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"`
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
197
198
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)
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
260
261
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"`
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
371
372
// 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
}
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
486
487
// 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.
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
570
571
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.
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
887
888
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.
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
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
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewSubSwitchControl(ConnectionUuid string, SwitchControlUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SubSwitchControl == nil {
t.SubSwitchControl = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl)
key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key{
ConnectionUuid: ConnectionUuid,
SwitchControlUuid: SwitchControlUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SubSwitchControl[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SubSwitchControl", key)
t.SubSwitchControl[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl{
ConnectionUuid: &ConnectionUuid,
SwitchControlUuid: &SwitchControlUuid,
// NewSwitch creates a new entry in the Switch list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewSwitch(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Switch == nil {
t.Switch = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Switch[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Switch", key)
t.Switch[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch{
LocalId: &LocalId,
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType represents the /tapi-common/context/connectivity-context/connection/switch-control/resilience-type YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType struct {
ProtectionType E_TapiTopology_ProtectionType `path:"protection-type" module:"tapi-connectivity"`
RestorationPolicy E_TapiTopology_RestorationPolicy `path:"restoration-policy" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType 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_ResilienceType) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType"], t, opts...); err != nil {
return err
}
return nil
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct {
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name `path:"name" module:"tapi-connectivity"`
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
RoutingConstraint *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint `path:"routing-constraint" module:"tapi-connectivity"`
TopologyConstraint *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint `path:"topology-constraint" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_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_ResiliencyRouteConstraint_Name{
ValueName: &ValueName,
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}
return map[string]interface{}{
"local-id": *t.LocalId,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-connectivity"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-connectivity"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-connectivity"`
LatencyCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-connectivity"`
MaxAllowedCost *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-connectivity"`
MaxAllowedDelay *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-connectivity"`
MaxAllowedHops *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-connectivity"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-connectivity"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-connectivity"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
t.CostCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
return t.CostCharacteristic[key], nil
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
t.LatencyCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
return t.LatencyCharacteristic[key], nil
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic)
}
key := RiskCharacteristicName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic{
return t.RiskDiversityCharacteristic[key], nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-connectivity"`
CostName *string `path:"cost-name" module:"tapi-connectivity"`
CostValue *string `path:"cost-value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-connectivity"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-connectivity"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-connectivity"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-connectivity"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
}
return map[string]interface{}{
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-connectivity"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-connectivity"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-connectivity"`
ExcludeLink *string `path:"exclude-link" module:"tapi-connectivity"`
ExcludeNode *string `path:"exclude-node" module:"tapi-connectivity"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-connectivity"`
ExcludePath *string `path:"exclude-path" module:"tapi-connectivity"`
IncludeLink *string `path:"include-link" module:"tapi-connectivity"`
IncludeNode *string `path:"include-node" module:"tapi-connectivity"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-connectivity"`
IncludePath *string `path:"include-path" module:"tapi-connectivity"`
IncludeTopology *string `path:"include-topology" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name `path:"name" module:"tapi-connectivity"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name)
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_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name{
ValueName: &ValueName,
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl represents the /tapi-common/context/connectivity-context/connection/switch-control/sub-switch-control YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
SwitchControlUuid *string `path:"switch-control-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl 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_SubSwitchControl) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
}
if t.SwitchControlUuid == nil {
return nil, fmt.Errorf("nil value for key SwitchControlUuid")
"connection-uuid": *t.ConnectionUuid,
"switch-control-uuid": *t.SwitchControlUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch represents the /tapi-common/context/connectivity-context/connection/switch-control/switch YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct {
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name `path:"name" module:"tapi-connectivity"`
SelectedConnectionEndPoint map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint `path:"selected-connection-end-point" module:"tapi-connectivity"`
SelectedRoute map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute `path:"selected-route" module:"tapi-connectivity"`
SelectionReason E_TapiConnectivity_SelectionReason `path:"selection-reason" module:"tapi-connectivity"`
SwitchDirection E_TapiConnectivity_PortDirection `path:"switch-direction" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key represents the key for list SelectedConnectionEndPoint of element /tapi-common/context/connectivity-context/connection/switch-control/switch.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key struct {
TopologyUuid string `path:"topology-uuid"`
NodeUuid string `path:"node-uuid"`
NodeEdgePointUuid string `path:"node-edge-point-uuid"`
ConnectionEndPointUuid string `path:"connection-end-point-uuid"`
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key represents the key for list SelectedRoute of element /tapi-common/context/connectivity-context/connection/switch-control/switch.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key struct {
ConnectionUuid string `path:"connection-uuid"`
RouteLocalId string `path:"route-local-id"`
}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name)
}
// 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_Switch_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
// NewSelectedConnectionEndPoint creates a new entry in the SelectedConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewSelectedConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SelectedConnectionEndPoint == nil {
t.SelectedConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint)
}
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key{
TopologyUuid: TopologyUuid,
NodeUuid: NodeUuid,
NodeEdgePointUuid: NodeEdgePointUuid,
ConnectionEndPointUuid: ConnectionEndPointUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SelectedConnectionEndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SelectedConnectionEndPoint", key)
}
t.SelectedConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint{
TopologyUuid: &TopologyUuid,
NodeUuid: &NodeUuid,
NodeEdgePointUuid: &NodeEdgePointUuid,
ConnectionEndPointUuid: &ConnectionEndPointUuid,
}
return t.SelectedConnectionEndPoint[key], nil
// NewSelectedRoute creates a new entry in the SelectedRoute list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewSelectedRoute(ConnectionUuid string, RouteLocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute, error){
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SelectedRoute == nil {
t.SelectedRoute = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute)
}
key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key{
ConnectionUuid: ConnectionUuid,
RouteLocalId: RouteLocalId,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SelectedRoute[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SelectedRoute", key)
}
t.SelectedRoute[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute{
ConnectionUuid: &ConnectionUuid,
RouteLocalId: &RouteLocalId,
}
return t.SelectedRoute[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/selected-connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint struct {
ConnectionEndPointUuid *string `path:"connection-end-point-uuid" module:"tapi-connectivity"`
NodeEdgePointUuid *string `path:"node-edge-point-uuid" module:"tapi-connectivity"`
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionEndPointUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
}
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_SwitchControl_Switch_SelectedConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/selected-route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
RouteLocalId *string `path:"route-local-id" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
if t.RouteLocalId == nil {
return nil, fmt.Errorf("nil value for key RouteLocalId")
}
return map[string]interface{}{
"connection-uuid": *t.ConnectionUuid,
"route-local-id": *t.RouteLocalId,
}, nil
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService represents the /tapi-common/context/connectivity-context/connectivity-service YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService struct {
AdministrativeState E_TapiCommon_AdministrativeState `path:"administrative-state" module:"tapi-connectivity"`
Connection map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection `path:"connection" module:"tapi-connectivity"`
ConnectivityConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint `path:"connectivity-constraint" module:"tapi-connectivity"`
ConnectivityService map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService `path:"connectivity-service" module:"tapi-connectivity"`
Direction E_TapiConnectivity_ForwardingDirection `path:"direction" module:"tapi-connectivity"`
EndPoint map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint `path:"end-point" module:"tapi-connectivity"`
LifecycleState E_TapiCommon_LifecycleState `path:"lifecycle-state" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Name `path:"name" module:"tapi-connectivity"`
OperationalState E_TapiCommon_OperationalState `path:"operational-state" module:"tapi-connectivity"`
ResilienceConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint `path:"resilience-constraint" module:"tapi-connectivity"`
RoutingConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint `path:"routing-constraint" module:"tapi-connectivity"`
TopologyConstraint map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint `path:"topology-constraint" module:"tapi-connectivity"`
Uuid *string `path:"uuid" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService) IsYANGGoStruct() {}
// NewConnection creates a new entry in the Connection list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewConnection(ConnectionUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityService_Connection)
// 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_ConnectivityService_Connection{
ConnectionUuid: &ConnectionUuid,
// NewConnectivityService creates a new entry in the ConnectivityService list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewConnectivityService(ConnectivityServiceUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityService)
// 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_ConnectivityService{
ConnectivityServiceUuid: &ConnectivityServiceUuid,
return t.ConnectivityService[key], nil
// NewEndPoint creates a new entry in the EndPoint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewEndPoint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.EndPoint == nil {
t.EndPoint = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.EndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list EndPoint", key)
t.EndPoint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint{
LocalId: &LocalId,
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityService_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_ConnectivityService_Name{
ValueName: &ValueName,
// NewTopologyConstraint creates a new entry in the TopologyConstraint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewTopologyConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.TopologyConstraint == nil {
t.TopologyConstraint = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.TopologyConstraint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list TopologyConstraint", key)
t.TopologyConstraint[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint{
LocalId: &LocalId,
return t.TopologyConstraint[key], nil
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection represents the /tapi-common/context/connectivity-context/connectivity-service/connection YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_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_ConnectivityService_Connection) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
"connection-uuid": *t.ConnectionUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint struct {
ConnectionExclusion []string `path:"connection-exclusion" module:"tapi-connectivity"`
ConnectionInclusion []string `path:"connection-inclusion" module:"tapi-connectivity"`
CorouteInclusion *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion `path:"coroute-inclusion" module:"tapi-connectivity"`
DiversityExclusion map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion `path:"diversity-exclusion" module:"tapi-connectivity"`
RequestedCapacity *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity `path:"requested-capacity" module:"tapi-connectivity"`
Schedule *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule `path:"schedule" module:"tapi-connectivity"`
ServiceLevel *string `path:"service-level" module:"tapi-connectivity"`
ServiceType E_TapiConnectivity_ServiceType `path:"service-type" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) IsYANGGoStruct() {}
// NewDiversityExclusion creates a new entry in the DiversityExclusion list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) NewDiversityExclusion(ConnectivityServiceUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.DiversityExclusion == nil {
t.DiversityExclusion = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion)
}
key := ConnectivityServiceUuid
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.DiversityExclusion[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list DiversityExclusion", key)
}
t.DiversityExclusion[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion{
ConnectivityServiceUuid: &ConnectivityServiceUuid,
}
return t.DiversityExclusion[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/coroute-inclusion YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion struct {
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_CorouteInclusion) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/diversity-exclusion YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion struct {
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectivityServiceUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectivityServiceUuid")
"connectivity-service-uuid": *t.ConnectivityServiceUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_DiversityExclusion) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/requested-capacity YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity struct {
TotalSize *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize `path:"total-size" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/requested-capacity/total-size YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize"], t, opts...); err != nil {
return err
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_RequestedCapacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-constraint/schedule YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule struct {
EndTime *string `path:"end-time" module:"tapi-connectivity"`
StartTime *string `path:"start-time" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint_Schedule) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService represents the /tapi-common/context/connectivity-context/connectivity-service/connectivity-service YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService struct {
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectivityServiceUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectivityServiceUuid")
"connectivity-service-uuid": *t.ConnectivityServiceUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct {
AdministrativeState E_TapiCommon_AdministrativeState `path:"administrative-state" module:"tapi-connectivity"`
Capacity *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity `path:"capacity" module:"tapi-connectivity"`
ConnectionEndPoint map[TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint `path:"connection-end-point" module:"tapi-connectivity"`
Direction E_TapiConnectivity_PortDirection `path:"direction" module:"tapi-connectivity"`
LayerProtocolName E_TapiConnectivity_LayerProtocolName `path:"layer-protocol-name" module:"tapi-connectivity"`
LayerProtocolQualifier E_TapiConnectivity_LayerProtocolQualifier `path:"layer-protocol-qualifier" module:"tapi-connectivity"`
LifecycleState E_TapiCommon_LifecycleState `path:"lifecycle-state" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
MediaChannelConnectivityServiceEndPointSpec *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec `path:"media-channel-connectivity-service-end-point-spec" module:"tapi-photonic-media"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name `path:"name" module:"tapi-connectivity"`
OperationalState E_TapiCommon_OperationalState `path:"operational-state" module:"tapi-connectivity"`
OtsiConnectivityServiceEndPointSpec *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec `path:"otsi-connectivity-service-end-point-spec" module:"tapi-photonic-media"`
PeerFwdConnectivityServiceEndPoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint `path:"peer-fwd-connectivity-service-end-point" module:"tapi-connectivity"`
ProtectingConnectivityServiceEndPoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint `path:"protecting-connectivity-service-end-point" module:"tapi-connectivity"`
ProtectionRole E_TapiConnectivity_ProtectionRole `path:"protection-role" module:"tapi-connectivity"`
Role E_TapiConnectivity_PortRole `path:"role" module:"tapi-connectivity"`
ServerConnectivityServiceEndPoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint `path:"server-connectivity-service-end-point" module:"tapi-connectivity"`
ServiceInterfacePoint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint `path:"service-interface-point" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key represents the key for list ConnectionEndPoint of element /tapi-common/context/connectivity-context/connectivity-service/end-point.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key struct {
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_ConnectivityService_EndPoint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) NewConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_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_ConnectivityService_EndPoint_ConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint)
key := TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint_Key{
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_ConnectivityService_EndPoint_ConnectionEndPoint{
NodeEdgePointUuid: &NodeEdgePointUuid,
ConnectionEndPointUuid: &ConnectionEndPointUuid,
return t.ConnectionEndPoint[key], nil
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_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_ConnectivityService_EndPoint_Name{
ValueName: &ValueName,
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
return map[string]interface{}{
"local-id": *t.LocalId,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint"], 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_ConnectivityService_EndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/capacity YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity struct {
TotalSize *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize `path:"total-size" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/capacity/total-size YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Capacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint struct {
ConnectionEndPointUuid *string `path:"connection-end-point-uuid" module:"tapi-connectivity"`
NodeEdgePointUuid *string `path:"node-edge-point-uuid" module:"tapi-connectivity"`
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionEndPointUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
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_ConnectivityService_EndPoint_ConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec struct {
McConfig *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig `path:"mc-config" module:"tapi-photonic-media"`
PowerManagementConfig *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig `path:"power-management-config" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/mc-config YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig struct {
Spectrum *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum `path:"spectrum" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/mc-config/spectrum YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum struct {
FrequencyConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
LowerFrequency *uint64 `path:"lower-frequency" module:"tapi-photonic-media"`
UpperFrequency *uint64 `path:"upper-frequency" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/mc-config/spectrum/frequency-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_McConfig_Spectrum_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/power-management-config YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig struct {
ExpectedMaximumInputPower *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower `path:"expected-maximum-input-power" module:"tapi-photonic-media"`
ExpectedMinimumInputPower *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower `path:"expected-minimum-input-power" module:"tapi-photonic-media"`
IntendedMaximumOutputPower *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower `path:"intended-maximum-output-power" module:"tapi-photonic-media"`
IntendedMinimumOutputPower *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower `path:"intended-minimum-output-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/power-management-config/expected-maximum-input-power YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMaximumInputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/power-management-config/expected-minimum-input-power YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_ExpectedMinimumInputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/power-management-config/intended-maximum-output-power YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMaximumOutputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/media-channel-connectivity-service-end-point-spec/power-management-config/intended-minimum-output-power YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_MediaChannelConnectivityServiceEndPointSpec_PowerManagementConfig_IntendedMinimumOutputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_Name"], 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_ConnectivityService_EndPoint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec struct {
OtsiConfig *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig `path:"otsi-config" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig struct {
ApplicationIdentifier *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier `path:"application-identifier" module:"tapi-photonic-media"`
CentralFrequency *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency `path:"central-frequency" module:"tapi-photonic-media"`
LaserControl E_TapiPhotonicMedia_LaserControlType `path:"laser-control" module:"tapi-photonic-media"`
Modulation E_TapiPhotonicMedia_ModulationTechnique `path:"modulation" module:"tapi-photonic-media"`
Spectrum *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum `path:"spectrum" module:"tapi-photonic-media"`
TotalPowerWarnThresholdLower *float64 `path:"total-power-warn-threshold-lower" module:"tapi-photonic-media"`
TotalPowerWarnThresholdUpper *float64 `path:"total-power-warn-threshold-upper" module:"tapi-photonic-media"`
TransmitPower *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower `path:"transmit-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config/application-identifier YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier struct {
ApplicationCode *string `path:"application-code" module:"tapi-photonic-media"`
ApplicationIdentifierType E_TapiPhotonicMedia_ApplicationIdentifierType `path:"application-identifier-type" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_ApplicationIdentifier) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config/central-frequency YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency struct {
CentralFrequency *uint64 `path:"central-frequency" module:"tapi-photonic-media"`
FrequencyConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config/central-frequency/frequency-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_CentralFrequency_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config/spectrum YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum struct {
FrequencyConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
LowerFrequency *uint64 `path:"lower-frequency" module:"tapi-photonic-media"`
UpperFrequency *uint64 `path:"upper-frequency" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config/spectrum/frequency-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_Spectrum_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/otsi-connectivity-service-end-point-spec/otsi-config/transmit-power YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_OtsiConnectivityServiceEndPointSpec_OtsiConfig_TransmitPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/peer-fwd-connectivity-service-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint struct {
ConnectivityServiceEndPointLocalId *string `path:"connectivity-service-end-point-local-id" module:"tapi-connectivity"`
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_PeerFwdConnectivityServiceEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/protecting-connectivity-service-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint struct {
ConnectivityServiceEndPointLocalId *string `path:"connectivity-service-end-point-local-id" module:"tapi-connectivity"`
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ProtectingConnectivityServiceEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/server-connectivity-service-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint struct {
ConnectivityServiceEndPointLocalId *string `path:"connectivity-service-end-point-local-id" module:"tapi-connectivity"`
ConnectivityServiceUuid *string `path:"connectivity-service-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServerConnectivityServiceEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint represents the /tapi-common/context/connectivity-context/connectivity-service/end-point/service-interface-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint struct {
ServiceInterfacePointUuid *string `path:"service-interface-point-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint_ServiceInterfacePoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_Name represents the /tapi-common/context/connectivity-context/connectivity-service/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint struct {
FaultConditionDetermination E_TapiConnectivity_FaultConditionDetermination `path:"fault-condition-determination" module:"tapi-connectivity"`
HoldOffTime *uint64 `path:"hold-off-time" module:"tapi-connectivity"`
IsCoordinatedSwitchingBothEnds *bool `path:"is-coordinated-switching-both-ends" module:"tapi-connectivity"`
IsFrozen *bool `path:"is-frozen" module:"tapi-connectivity"`
IsLockOut *bool `path:"is-lock-out" module:"tapi-connectivity"`
MaxSwitchTimes *uint64 `path:"max-switch-times" module:"tapi-connectivity"`
PreferredRestorationLayer []E_TapiConnectivity_LayerProtocolName `path:"preferred-restoration-layer" module:"tapi-connectivity"`
ResilienceType *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType `path:"resilience-type" module:"tapi-connectivity"`
ResiliencyRouteConstraint map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint `path:"resiliency-route-constraint" module:"tapi-connectivity"`
RestorationCoordinateType E_TapiConnectivity_CoordinateType `path:"restoration-coordinate-type" module:"tapi-connectivity"`
RestorePriority *uint64 `path:"restore-priority" module:"tapi-connectivity"`
ReversionMode E_TapiConnectivity_ReversionMode `path:"reversion-mode" module:"tapi-connectivity"`
SelectionControl E_TapiConnectivity_SelectionControl `path:"selection-control" module:"tapi-connectivity"`
WaitToRevertTime *uint64 `path:"wait-to-revert-time" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint) IsYANGGoStruct() {}
// NewResiliencyRouteConstraint creates a new entry in the ResiliencyRouteConstraint list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint) NewResiliencyRouteConstraint(LocalId string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.ResiliencyRouteConstraint == nil {
t.ResiliencyRouteConstraint = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint)
}
// 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_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint{
LocalId: &LocalId,
}
return t.ResiliencyRouteConstraint[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resilience-type YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType struct {
ProtectionType E_TapiTopology_ProtectionType `path:"protection-type" module:"tapi-connectivity"`
RestorationPolicy E_TapiTopology_RestorationPolicy `path:"restoration-policy" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType"], t, opts...); err != nil {
return err
}
return nil
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResilienceType) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint struct {
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name `path:"name" module:"tapi-connectivity"`
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
RoutingConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint `path:"routing-constraint" module:"tapi-connectivity"`
TopologyConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint `path:"topology-constraint" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_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_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name{
ValueName: &ValueName,
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}
return map[string]interface{}{
"local-id": *t.LocalId,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-connectivity"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-connectivity"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-connectivity"`
LatencyCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-connectivity"`
MaxAllowedCost *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-connectivity"`
MaxAllowedDelay *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-connectivity"`
MaxAllowedHops *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-connectivity"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-connectivity"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-connectivity"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic)
}
key := CostName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
}
t.CostCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
}
return t.CostCharacteristic[key], nil
}
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic)
}
key := TrafficPropertyName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
}
t.LatencyCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
}
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
return t.RiskDiversityCharacteristic[key], nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint"], 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_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-connectivity"`
CostName *string `path:"cost-name" module:"tapi-connectivity"`
CostValue *string `path:"cost-value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-connectivity"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-connectivity"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-connectivity"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-connectivity"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-connectivity"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic"], 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.
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-connectivity"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-connectivity"`
ExcludeLink *string `path:"exclude-link" module:"tapi-connectivity"`
ExcludeNode *string `path:"exclude-node" module:"tapi-connectivity"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-connectivity"`
ExcludePath *string `path:"exclude-path" module:"tapi-connectivity"`
IncludeLink *string `path:"include-link" module:"tapi-connectivity"`
IncludeNode *string `path:"include-node" module:"tapi-connectivity"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-connectivity"`
IncludePath *string `path:"include-path" module:"tapi-connectivity"`
IncludeTopology *string `path:"include-topology" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name `path:"name" module:"tapi-connectivity"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_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_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/resilience-constraint/resiliency-route-constraint/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-connectivity"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-connectivity"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-connectivity"`
LatencyCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-connectivity"`
MaxAllowedCost *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-connectivity"`
MaxAllowedDelay *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-connectivity"`
MaxAllowedHops *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-connectivity"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-connectivity"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-connectivity"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
t.CostCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
return t.CostCharacteristic[key], nil
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
t.LatencyCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic)
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
}
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
}
return t.RiskDiversityCharacteristic[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-connectivity"`
CostName *string `path:"cost-name" module:"tapi-connectivity"`
CostValue *string `path:"cost-value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}
return map[string]interface{}{
"cost-name": *t.CostName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-connectivity"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-connectivity"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-connectivity"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-connectivity"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connectivity-service/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-connectivity"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint represents the /tapi-common/context/connectivity-context/connectivity-service/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-connectivity"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-connectivity"`
ExcludeLink *string `path:"exclude-link" module:"tapi-connectivity"`
ExcludeNode *string `path:"exclude-node" module:"tapi-connectivity"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-connectivity"`
ExcludePath *string `path:"exclude-path" module:"tapi-connectivity"`
IncludeLink *string `path:"include-link" module:"tapi-connectivity"`
IncludeNode *string `path:"include-node" module:"tapi-connectivity"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-connectivity"`
IncludePath *string `path:"include-path" module:"tapi-connectivity"`
IncludeTopology *string `path:"include-topology" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name `path:"name" module:"tapi-connectivity"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name)
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connectivity-service/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_Name represents the /tapi-common/context/name YANG schema element.
type TapiCommon_Context_Name struct {
Value *string `path:"value" module:"tapi-common"`
ValueName *string `path:"value-name" module:"tapi-common"`
// IsYANGGoStruct ensures that TapiCommon_Context_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_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext represents the /tapi-common/context/path-computation-context YANG schema element.
type TapiCommon_Context_PathComputationContext struct {
Path map[string]*TapiCommon_Context_PathComputationContext_Path `path:"path" module:"tapi-path-computation"`
PathCompService map[string]*TapiCommon_Context_PathComputationContext_PathCompService `path:"path-comp-service" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext) IsYANGGoStruct() {}
// NewPath creates a new entry in the Path list of the
// TapiCommon_Context_PathComputationContext struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext) NewPath(Uuid string) (*TapiCommon_Context_PathComputationContext_Path, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Path == nil {
t.Path = make(map[string]*TapiCommon_Context_PathComputationContext_Path)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Path[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Path", key)
t.Path[key] = &TapiCommon_Context_PathComputationContext_Path{
Uuid: &Uuid,
// NewPathCompService creates a new entry in the PathCompService list of the
// TapiCommon_Context_PathComputationContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext) NewPathCompService(Uuid string) (*TapiCommon_Context_PathComputationContext_PathCompService, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.PathCompService == nil {
t.PathCompService = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.PathCompService[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list PathCompService", key)
}
t.PathCompService[key] = &TapiCommon_Context_PathComputationContext_PathCompService{
Uuid: &Uuid,
}
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path represents the /tapi-common/context/path-computation-context/path YANG schema element.
type TapiCommon_Context_PathComputationContext_Path struct {
Direction E_TapiPathComputation_ForwardingDirection `path:"direction" module:"tapi-path-computation"`
LayerProtocolName E_TapiPathComputation_LayerProtocolName `path:"layer-protocol-name" module:"tapi-path-computation"`
Link map[TapiCommon_Context_PathComputationContext_Path_Link_Key]*TapiCommon_Context_PathComputationContext_Path_Link `path:"link" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_Path_Name `path:"name" module:"tapi-path-computation"`
RoutingConstraint *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint `path:"routing-constraint" module:"tapi-path-computation"`
Uuid *string `path:"uuid" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path) IsYANGGoStruct() {}
// TapiCommon_Context_PathComputationContext_Path_Link_Key represents the key for list Link of element /tapi-common/context/path-computation-context/path.
type TapiCommon_Context_PathComputationContext_Path_Link_Key struct {
TopologyUuid string `path:"topology-uuid"`
LinkUuid string `path:"link-uuid"`
// NewLink creates a new entry in the Link list of the
// TapiCommon_Context_PathComputationContext_Path struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path) NewLink(TopologyUuid string, LinkUuid string) (*TapiCommon_Context_PathComputationContext_Path_Link, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Link == nil {
t.Link = make(map[TapiCommon_Context_PathComputationContext_Path_Link_Key]*TapiCommon_Context_PathComputationContext_Path_Link)
key := TapiCommon_Context_PathComputationContext_Path_Link_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.Link[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Link", key)
}
t.Link[key] = &TapiCommon_Context_PathComputationContext_Path_Link{
TopologyUuid: &TopologyUuid,
LinkUuid: &LinkUuid,
}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_Path struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_Path_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_Path_Name)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_Path_Name{
ValueName: &ValueName,
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_Path) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService represents the /tapi-common/context/path-computation-context/path-comp-service YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService struct {
Direction E_TapiPathComputation_ForwardingDirection `path:"direction" module:"tapi-path-computation"`
EndPoint map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint `path:"end-point" module:"tapi-path-computation"`
LayerProtocolName E_TapiPathComputation_LayerProtocolName `path:"layer-protocol-name" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Name `path:"name" module:"tapi-path-computation"`
ObjectiveFunction *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction `path:"objective-function" module:"tapi-path-computation"`
OptimizationConstraint *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint `path:"optimization-constraint" module:"tapi-path-computation"`
Path map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Path `path:"path" module:"tapi-path-computation"`
RoutingConstraint *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint `path:"routing-constraint" module:"tapi-path-computation"`
TopologyConstraint map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint `path:"topology-constraint" module:"tapi-path-computation"`
Uuid *string `path:"uuid" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService) IsYANGGoStruct() {}
// NewEndPoint creates a new entry in the EndPoint list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewEndPoint(LocalId string) (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.EndPoint == nil {
t.EndPoint = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.EndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list EndPoint", key)
t.EndPoint[key] = &TapiCommon_Context_PathComputationContext_PathCompService_EndPoint{
LocalId: &LocalId,
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_Name{
ValueName: &ValueName,
// NewPath creates a new entry in the Path list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewPath(PathUuid string) (*TapiCommon_Context_PathComputationContext_PathCompService_Path, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Path == nil {
t.Path = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_Path)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Path[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Path", key)
t.Path[key] = &TapiCommon_Context_PathComputationContext_PathCompService_Path{
PathUuid: &PathUuid,
// NewTopologyConstraint creates a new entry in the TopologyConstraint list of the
// TapiCommon_Context_PathComputationContext_PathCompService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_PathComputationContext_PathCompService) NewTopologyConstraint(LocalId string) (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.TopologyConstraint == nil {
t.TopologyConstraint = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.TopologyConstraint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list TopologyConstraint", key)
t.TopologyConstraint[key] = &TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint{
LocalId: &LocalId,
return t.TopologyConstraint[key], nil
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint represents the /tapi-common/context/path-computation-context/path-comp-service/end-point YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct {
Capacity *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity `path:"capacity" module:"tapi-path-computation"`
Direction E_TapiPathComputation_PortDirection `path:"direction" module:"tapi-path-computation"`
LayerProtocolName E_TapiPathComputation_LayerProtocolName `path:"layer-protocol-name" module:"tapi-path-computation"`
LayerProtocolQualifier E_TapiPathComputation_LayerProtocolQualifier `path:"layer-protocol-qualifier" module:"tapi-path-computation"`
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name `path:"name" module:"tapi-path-computation"`
Role E_TapiPathComputation_PortRole `path:"role" module:"tapi-path-computation"`
ServiceInterfacePoint *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint `path:"service-interface-point" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name)
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_EndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/capacity YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity struct {
TotalSize *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize `path:"total-size" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/capacity/total-size YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Capacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint represents the /tapi-common/context/path-computation-context/path-comp-service/end-point/service-interface-point YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint struct {
ServiceInterfacePointUuid *string `path:"service-interface-point-uuid" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_EndPoint_ServiceInterfacePoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_Name represents the /tapi-common/context/path-computation-context/path-comp-service/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_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_PathComputationContext_PathCompService_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction represents the /tapi-common/context/path-computation-context/path-comp-service/objective-function YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction struct {
BandwidthOptimization E_TapiPathComputation_DirectiveValue `path:"bandwidth-optimization" module:"tapi-path-computation"`
ConcurrentPaths E_TapiPathComputation_DirectiveValue `path:"concurrent-paths" module:"tapi-path-computation"`
CostOptimization E_TapiPathComputation_DirectiveValue `path:"cost-optimization" module:"tapi-path-computation"`
LinkUtilization E_TapiPathComputation_DirectiveValue `path:"link-utilization" module:"tapi-path-computation"`
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name `path:"name" module:"tapi-path-computation"`
ResourceSharing E_TapiPathComputation_DirectiveValue `path:"resource-sharing" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
func (*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name represents the /tapi-common/context/path-computation-context/path-comp-service/objective-function/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_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_PathComputationContext_PathCompService_ObjectiveFunction_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_ObjectiveFunction_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/optimization-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint struct {
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name `path:"name" module:"tapi-path-computation"`
TrafficInterruption E_TapiPathComputation_DirectiveValue `path:"traffic-interruption" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
func (*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/optimization-constraint/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_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_PathComputationContext_PathCompService_OptimizationConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_OptimizationConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_Path represents the /tapi-common/context/path-computation-context/path-comp-service/path YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_Path struct {
PathUuid *string `path:"path-uuid" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_Path implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_Path) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_Path struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) ΛListKeyMap() (map[string]interface{}, error) {
if t.PathUuid == nil {
return nil, fmt.Errorf("nil value for key PathUuid")
}
return map[string]interface{}{
"path-uuid": *t.PathUuid,
}, nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_Path"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_Path) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-path-computation"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-path-computation"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-path-computation"`
LatencyCharacteristic map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-path-computation"`
MaxAllowedCost *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-path-computation"`
MaxAllowedDelay *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-path-computation"`
MaxAllowedHops *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-path-computation"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-path-computation"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-path-computation"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic, error){
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic)
}
key := CostName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
}
t.CostCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
}
return t.CostCharacteristic[key], nil
}
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic)
}
key := TrafficPropertyName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
}
t.LatencyCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
}
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic)
}
key := RiskCharacteristicName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
}
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
}
return t.RiskDiversityCharacteristic[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint"], 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_PathComputationContext_PathCompService_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-path-computation"`
CostName *string `path:"cost-name" module:"tapi-path-computation"`
CostValue *string `path:"cost-value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}
return map[string]interface{}{
"cost-name": *t.CostName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic"], 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_PathComputationContext_PathCompService_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-path-computation"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-path-computation"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-path-computation"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-path-computation"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
}
return map[string]interface{}{
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic"], 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_PathComputationContext_PathCompService_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost"], 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_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay"], 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_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops"], 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_PathComputationContext_PathCompService_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/path-computation-context/path-comp-service/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-path-computation"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
}
return map[string]interface{}{
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic"], 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_PathComputationContext_PathCompService_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint represents the /tapi-common/context/path-computation-context/path-comp-service/topology-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-path-computation"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-path-computation"`
ExcludeLink *string `path:"exclude-link" module:"tapi-path-computation"`
ExcludeNode *string `path:"exclude-node" module:"tapi-path-computation"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-path-computation"`
ExcludePath *string `path:"exclude-path" module:"tapi-path-computation"`
IncludeLink *string `path:"include-link" module:"tapi-path-computation"`
IncludeNode *string `path:"include-node" module:"tapi-path-computation"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-path-computation"`
IncludePath *string `path:"include-path" module:"tapi-path-computation"`
IncludeTopology *string `path:"include-topology" module:"tapi-path-computation"`
LocalId *string `path:"local-id" module:"tapi-path-computation"`
Name map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name `path:"name" module:"tapi-path-computation"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name)
}
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
}
t.Name[key] = &TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint) Λ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_PathComputationContext_PathCompService_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint"], 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_PathComputationContext_PathCompService_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name represents the /tapi-common/context/path-computation-context/path-comp-service/topology-constraint/name YANG schema element.
type TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_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_PathComputationContext_PathCompService_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_PathCompService_TopologyConstraint_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_PathComputationContext_PathCompService_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_Link represents the /tapi-common/context/path-computation-context/path/link YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_Link struct {
LinkUuid *string `path:"link-uuid" module:"tapi-path-computation"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_Link implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_Link) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_Link struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_Link) Λ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{}{
"link-uuid": *t.LinkUuid,
"topology-uuid": *t.TopologyUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_Link) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_Link"], 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_PathComputationContext_Path_Link) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_Name represents the /tapi-common/context/path-computation-context/path/name YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_Name struct {
Value *string `path:"value" module:"tapi-path-computation"`
ValueName *string `path:"value-name" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_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_PathComputationContext_Path_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_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_PathComputationContext_Path_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_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_PathComputationContext_Path_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint represents the /tapi-common/context/path-computation-context/path/routing-constraint YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-path-computation"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-path-computation"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-path-computation"`
LatencyCharacteristic map[string]*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-path-computation"`
MaxAllowedCost *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-path-computation"`
MaxAllowedDelay *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-path-computation"`
MaxAllowedHops *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-path-computation"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-path-computation"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-path-computation"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic)
}
key := CostName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
}
t.CostCharacteristic[key] = &TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
}
return t.CostCharacteristic[key], nil
}
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic)
}
key := TrafficPropertyName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
}
t.LatencyCharacteristic[key] = &TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
}
return t.LatencyCharacteristic[key], nil
}
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic)
}
key := RiskCharacteristicName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
}
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic{
RiskCharacteristicName: &RiskCharacteristicName,
}
return t.RiskDiversityCharacteristic[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint"], 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_PathComputationContext_Path_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/path-computation-context/path/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-path-computation"`
CostName *string `path:"cost-name" module:"tapi-path-computation"`
CostValue *string `path:"cost-value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}
return map[string]interface{}{
"cost-name": *t.CostName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_CostCharacteristic"], 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_PathComputationContext_Path_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/path-computation-context/path/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-path-computation"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-path-computation"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-path-computation"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-path-computation"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
}
return map[string]interface{}{
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic"], 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_PathComputationContext_Path_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/path-computation-context/path/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost"], 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_PathComputationContext_Path_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/path-computation-context/path/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay"], 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_PathComputationContext_Path_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/path-computation-context/path/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-path-computation"`
Value *uint64 `path:"value" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops"], 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_PathComputationContext_Path_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/path-computation-context/path/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-path-computation"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-path-computation"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
}
return map[string]interface{}{
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic"], 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_PathComputationContext_Path_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint represents the /tapi-common/context/service-interface-point YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint struct {
AdministrativeState E_TapiCommon_AdministrativeState `path:"administrative-state" module:"tapi-common"`
AvailableCapacity *TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity `path:"available-capacity" module:"tapi-common"`
Direction E_TapiCommon_PortDirection `path:"direction" module:"tapi-common"`
LayerProtocolName E_TapiCommon_LayerProtocolName `path:"layer-protocol-name" module:"tapi-common"`
LifecycleState E_TapiCommon_LifecycleState `path:"lifecycle-state" module:"tapi-common"`
MediaChannelServiceInterfacePointSpec *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec `path:"media-channel-service-interface-point-spec" module:"tapi-photonic-media"`
Name map[string]*TapiCommon_Context_ServiceInterfacePoint_Name `path:"name" module:"tapi-common"`
OperationalState E_TapiCommon_OperationalState `path:"operational-state" module:"tapi-common"`
OtsiServiceInterfacePointSpec *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec `path:"otsi-service-interface-point-spec" module:"tapi-photonic-media"`
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
SupportedLayerProtocolQualifier []E_TapiCommon_LayerProtocolQualifier `path:"supported-layer-protocol-qualifier" module:"tapi-common"`
TotalPotentialCapacity *TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity `path:"total-potential-capacity" module:"tapi-common"`
Uuid *string `path:"uuid" module:"tapi-common"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint 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_ServiceInterfacePoint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ServiceInterfacePoint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ServiceInterfacePoint) NewName(ValueName string) (*TapiCommon_Context_ServiceInterfacePoint_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_ServiceInterfacePoint_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_ServiceInterfacePoint_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint) Λ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_ServiceInterfacePoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint"], 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_ServiceInterfacePoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity represents the /tapi-common/context/service-interface-point/available-capacity YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity struct {
TotalSize *TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize `path:"total-size" module:"tapi-common"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity 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_ServiceInterfacePoint_AvailableCapacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity"], 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_ServiceInterfacePoint_AvailableCapacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize represents the /tapi-common/context/service-interface-point/available-capacity/total-size YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-common"`
Value *uint64 `path:"value" module:"tapi-common"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_AvailableCapacity_TotalSize"], 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_ServiceInterfacePoint_AvailableCapacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec struct {
McPool *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool `path:"mc-pool" module:"tapi-photonic-media"`
PowerManagementCapability *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability `path:"power-management-capability" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool struct {
AvailableSpectrum map[TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_Key]*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum `path:"available-spectrum" module:"tapi-photonic-media"`
OccupiedSpectrum map[TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_Key]*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum `path:"occupied-spectrum" module:"tapi-photonic-media"`
SupportableSpectrum map[TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_Key]*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum `path:"supportable-spectrum" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool) IsYANGGoStruct() {}
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_Key represents the key for list AvailableSpectrum of element /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_Key struct {
UpperFrequency uint64 `path:"upper-frequency"`
LowerFrequency uint64 `path:"lower-frequency"`
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_Key represents the key for list OccupiedSpectrum of element /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_Key struct {
UpperFrequency uint64 `path:"upper-frequency"`
LowerFrequency uint64 `path:"lower-frequency"`
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_Key represents the key for list SupportableSpectrum of element /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_Key struct {
UpperFrequency uint64 `path:"upper-frequency"`
LowerFrequency uint64 `path:"lower-frequency"`
// NewAvailableSpectrum creates a new entry in the AvailableSpectrum list of the
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool) NewAvailableSpectrum(UpperFrequency uint64, LowerFrequency uint64) (*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.AvailableSpectrum == nil {
t.AvailableSpectrum = make(map[TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_Key]*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum)
key := TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_Key{
UpperFrequency: UpperFrequency,
LowerFrequency: LowerFrequency,
}
// 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.AvailableSpectrum[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list AvailableSpectrum", key)
t.AvailableSpectrum[key] = &TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum{
UpperFrequency: &UpperFrequency,
LowerFrequency: &LowerFrequency,
// NewOccupiedSpectrum creates a new entry in the OccupiedSpectrum list of the
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool) NewOccupiedSpectrum(UpperFrequency uint64, LowerFrequency uint64) (*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.OccupiedSpectrum == nil {
t.OccupiedSpectrum = make(map[TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_Key]*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum)
key := TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_Key{
UpperFrequency: UpperFrequency,
LowerFrequency: LowerFrequency,
}
// 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.OccupiedSpectrum[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list OccupiedSpectrum", key)
t.OccupiedSpectrum[key] = &TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum{
UpperFrequency: &UpperFrequency,
LowerFrequency: &LowerFrequency,
// NewSupportableSpectrum creates a new entry in the SupportableSpectrum list of the
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool) NewSupportableSpectrum(UpperFrequency uint64, LowerFrequency uint64) (*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SupportableSpectrum == nil {
t.SupportableSpectrum = make(map[TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_Key]*TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum)
key := TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_Key{
UpperFrequency: UpperFrequency,
LowerFrequency: LowerFrequency,
}
// 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.SupportableSpectrum[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SupportableSpectrum", key)
t.SupportableSpectrum[key] = &TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum{
UpperFrequency: &UpperFrequency,
LowerFrequency: &LowerFrequency,
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool/available-spectrum YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum struct {
FrequencyConstraint *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
LowerFrequency *uint64 `path:"lower-frequency" module:"tapi-photonic-media"`
UpperFrequency *uint64 `path:"upper-frequency" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum) ΛListKeyMap() (map[string]interface{}, error) {
if t.LowerFrequency == nil {
return nil, fmt.Errorf("nil value for key LowerFrequency")
}
if t.UpperFrequency == nil {
return nil, fmt.Errorf("nil value for key UpperFrequency")
}
return map[string]interface{}{
"lower-frequency": *t.LowerFrequency,
"upper-frequency": *t.UpperFrequency,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool/available-spectrum/frequency-constraint YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint) IsYANGGoStruct() {}
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_AvailableSpectrum_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool/occupied-spectrum YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum struct {
FrequencyConstraint *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
LowerFrequency *uint64 `path:"lower-frequency" module:"tapi-photonic-media"`
UpperFrequency *uint64 `path:"upper-frequency" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum) ΛListKeyMap() (map[string]interface{}, error) {
if t.LowerFrequency == nil {
return nil, fmt.Errorf("nil value for key LowerFrequency")
}
if t.UpperFrequency == nil {
return nil, fmt.Errorf("nil value for key UpperFrequency")
}
return map[string]interface{}{
"lower-frequency": *t.LowerFrequency,
"upper-frequency": *t.UpperFrequency,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool/occupied-spectrum/frequency-constraint YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_OccupiedSpectrum_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool/supportable-spectrum YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum struct {
FrequencyConstraint *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
LowerFrequency *uint64 `path:"lower-frequency" module:"tapi-photonic-media"`
UpperFrequency *uint64 `path:"upper-frequency" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum) ΛListKeyMap() (map[string]interface{}, error) {
if t.LowerFrequency == nil {
return nil, fmt.Errorf("nil value for key LowerFrequency")
if t.UpperFrequency == nil {
return nil, fmt.Errorf("nil value for key UpperFrequency")
return map[string]interface{}{
"lower-frequency": *t.LowerFrequency,
"upper-frequency": *t.UpperFrequency,
}, nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/mc-pool/supportable-spectrum/frequency-constraint YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_McPool_SupportableSpectrum_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/power-management-capability YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability struct {
SupportableMaximumOutputPower *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower `path:"supportable-maximum-output-power" module:"tapi-photonic-media"`
SupportableMinimumOutputPower *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower `path:"supportable-minimum-output-power" module:"tapi-photonic-media"`
TolerableMaximumInputPower *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower `path:"tolerable-maximum-input-power" module:"tapi-photonic-media"`
TolerableMinimumInputPower *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower `path:"tolerable-minimum-input-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/power-management-capability/supportable-maximum-output-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/power-management-capability/supportable-minimum-output-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/power-management-capability/tolerable-maximum-input-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower represents the /tapi-common/context/service-interface-point/media-channel-service-interface-point-spec/power-management-capability/tolerable-minimum-input-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower"], 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_ServiceInterfacePoint_MediaChannelServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_Name represents the /tapi-common/context/service-interface-point/name YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_Name struct {
Value *string `path:"value" module:"tapi-common"`
ValueName *string `path:"value-name" module:"tapi-common"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_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_ServiceInterfacePoint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_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_ServiceInterfacePoint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec struct {
OtsiCapability *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability `path:"otsi-capability" module:"tapi-photonic-media"`
PowerManagementCapability *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability `path:"power-management-capability" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/otsi-capability YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability struct {
SupportableApplicationIdentifier map[string]*TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier `path:"supportable-application-identifier" module:"tapi-photonic-media"`
SupportableCentralFrequencySpectrumBand map[TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_Key]*TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand `path:"supportable-central-frequency-spectrum-band" module:"tapi-photonic-media"`
SupportableModulation []E_TapiPhotonicMedia_ModulationTechnique `path:"supportable-modulation" module:"tapi-photonic-media"`
TotalPowerWarnThreshold *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold `path:"total-power-warn-threshold" module:"tapi-photonic-media"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability) IsYANGGoStruct() {}
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_Key represents the key for list SupportableCentralFrequencySpectrumBand of element /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/otsi-capability.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_Key struct {
LowerCentralFrequency uint64 `path:"lower-central-frequency"`
UpperCentralFrequency uint64 `path:"upper-central-frequency"`
// NewSupportableApplicationIdentifier creates a new entry in the SupportableApplicationIdentifier list of the
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability) NewSupportableApplicationIdentifier(ApplicationCode string) (*TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SupportableApplicationIdentifier == nil {
t.SupportableApplicationIdentifier = make(map[string]*TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier)
// 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.SupportableApplicationIdentifier[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SupportableApplicationIdentifier", key)
t.SupportableApplicationIdentifier[key] = &TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier{
ApplicationCode: &ApplicationCode,
return t.SupportableApplicationIdentifier[key], nil
// NewSupportableCentralFrequencySpectrumBand creates a new entry in the SupportableCentralFrequencySpectrumBand list of the
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability) NewSupportableCentralFrequencySpectrumBand(LowerCentralFrequency uint64, UpperCentralFrequency uint64) (*TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SupportableCentralFrequencySpectrumBand == nil {
t.SupportableCentralFrequencySpectrumBand = make(map[TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_Key]*TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand)
key := TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_Key{
LowerCentralFrequency: LowerCentralFrequency,
UpperCentralFrequency: UpperCentralFrequency,
}
// 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.SupportableCentralFrequencySpectrumBand[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SupportableCentralFrequencySpectrumBand", key)
t.SupportableCentralFrequencySpectrumBand[key] = &TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand{
LowerCentralFrequency: &LowerCentralFrequency,
UpperCentralFrequency: &UpperCentralFrequency,
return t.SupportableCentralFrequencySpectrumBand[key], nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/otsi-capability/supportable-application-identifier YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier struct {
ApplicationCode *string `path:"application-code" module:"tapi-photonic-media"`
ApplicationIdentifierType E_TapiPhotonicMedia_ApplicationIdentifierType `path:"application-identifier-type" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier) ΛListKeyMap() (map[string]interface{}, error) {
if t.ApplicationCode == nil {
return nil, fmt.Errorf("nil value for key ApplicationCode")
}
return map[string]interface{}{
"application-code": *t.ApplicationCode,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableApplicationIdentifier) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/otsi-capability/supportable-central-frequency-spectrum-band YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand struct {
FrequencyConstraint *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint `path:"frequency-constraint" module:"tapi-photonic-media"`
LowerCentralFrequency *uint64 `path:"lower-central-frequency" module:"tapi-photonic-media"`
UpperCentralFrequency *uint64 `path:"upper-central-frequency" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand struct, which is a YANG list entry.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand) ΛListKeyMap() (map[string]interface{}, error) {
if t.LowerCentralFrequency == nil {
return nil, fmt.Errorf("nil value for key LowerCentralFrequency")
}
if t.UpperCentralFrequency == nil {
return nil, fmt.Errorf("nil value for key UpperCentralFrequency")
}
return map[string]interface{}{
"lower-central-frequency": *t.LowerCentralFrequency,
"upper-central-frequency": *t.UpperCentralFrequency,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/otsi-capability/supportable-central-frequency-spectrum-band/frequency-constraint YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint struct {
AdjustmentGranularity E_TapiPhotonicMedia_AdjustmentGranularity `path:"adjustment-granularity" module:"tapi-photonic-media"`
GridType E_TapiPhotonicMedia_GridType `path:"grid-type" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_SupportableCentralFrequencySpectrumBand_FrequencyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/otsi-capability/total-power-warn-threshold YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold struct {
TotalPowerLowerWarnThresholdDefault *float64 `path:"total-power-lower-warn-threshold-default" module:"tapi-photonic-media"`
TotalPowerLowerWarnThresholdMax *float64 `path:"total-power-lower-warn-threshold-max" module:"tapi-photonic-media"`
TotalPowerLowerWarnThresholdMin *float64 `path:"total-power-lower-warn-threshold-min" module:"tapi-photonic-media"`
TotalPowerUpperWarnThresholdDefault *float64 `path:"total-power-upper-warn-threshold-default" module:"tapi-photonic-media"`
TotalPowerUpperWarnThresholdMax *float64 `path:"total-power-upper-warn-threshold-max" module:"tapi-photonic-media"`
TotalPowerUpperWarnThresholdMin *float64 `path:"total-power-upper-warn-threshold-min" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_OtsiCapability_TotalPowerWarnThreshold) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/power-management-capability YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability struct {
SupportableMaximumOutputPower *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower `path:"supportable-maximum-output-power" module:"tapi-photonic-media"`
SupportableMinimumOutputPower *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower `path:"supportable-minimum-output-power" module:"tapi-photonic-media"`
TolerableMaximumInputPower *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower `path:"tolerable-maximum-input-power" module:"tapi-photonic-media"`
TolerableMinimumInputPower *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower `path:"tolerable-minimum-input-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/power-management-capability/supportable-maximum-output-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMaximumOutputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/power-management-capability/supportable-minimum-output-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_SupportableMinimumOutputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/power-management-capability/tolerable-maximum-input-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMaximumInputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower represents the /tapi-common/context/service-interface-point/otsi-service-interface-point-spec/power-management-capability/tolerable-minimum-input-power YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower struct {
PowerSpectralDensity *float64 `path:"power-spectral-density" module:"tapi-photonic-media"`
TotalPower *float64 `path:"total-power" module:"tapi-photonic-media"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower"], 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_ServiceInterfacePoint_OtsiServiceInterfacePointSpec_PowerManagementCapability_TolerableMinimumInputPower) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity represents the /tapi-common/context/service-interface-point/total-potential-capacity YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity struct {
TotalSize *TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize `path:"total-size" module:"tapi-common"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity 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_ServiceInterfacePoint_TotalPotentialCapacity) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity"], 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_ServiceInterfacePoint_TotalPotentialCapacity) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize represents the /tapi-common/context/service-interface-point/total-potential-capacity/total-size YANG schema element.
type TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize struct {
Unit E_TapiCommon_CapacityUnit `path:"unit" module:"tapi-common"`
Value *uint64 `path:"value" module:"tapi-common"`
// IsYANGGoStruct ensures that TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize"], 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_ServiceInterfacePoint_TotalPotentialCapacity_TotalSize) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_TopologyContext represents the /tapi-common/context/topology-context YANG schema element.
type TapiCommon_Context_TopologyContext struct {
NwTopologyService *TapiCommon_Context_TopologyContext_NwTopologyService `path:"nw-topology-service" module:"tapi-topology"`
Topology map[string]*TapiCommon_Context_TopologyContext_Topology `path:"topology" module:"tapi-topology"`
// IsYANGGoStruct ensures that TapiCommon_Context_TopologyContext 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_TopologyContext) IsYANGGoStruct() {}
// NewTopology creates a new entry in the Topology list of the
// TapiCommon_Context_TopologyContext struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_TopologyContext) NewTopology(Uuid string) (*TapiCommon_Context_TopologyContext_Topology, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Topology == nil {
t.Topology = make(map[string]*TapiCommon_Context_TopologyContext_Topology)
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.Topology[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Topology", key)
}
t.Topology[key] = &TapiCommon_Context_TopologyContext_Topology{
Uuid: &Uuid,
}
return t.Topology[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_TopologyContext) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_TopologyContext"], 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_TopologyContext) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
// TapiCommon_Context_TopologyContext_NwTopologyService represents the /tapi-common/context/topology-context/nw-topology-service YANG schema element.
type TapiCommon_Context_TopologyContext_NwTopologyService struct {
Name map[string]*TapiCommon_Context_TopologyContext_NwTopologyService_Name `path:"name" module:"tapi-topology"`
Topology map[string]*TapiCommon_Context_TopologyContext_NwTopologyService_Topology `path:"topology" module:"tapi-topology"`
Uuid *string `path:"uuid" module:"tapi-topology"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_TopologyContext_NwTopologyService 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_TopologyContext_NwTopologyService) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_TopologyContext_NwTopologyService struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_TopologyContext_NwTopologyService) NewName(ValueName string) (*TapiCommon_Context_TopologyContext_NwTopologyService_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_TopologyContext_NwTopologyService_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_TopologyContext_NwTopologyService_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// NewTopology creates a new entry in the Topology list of the
// TapiCommon_Context_TopologyContext_NwTopologyService struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_TopologyContext_NwTopologyService) NewTopology(TopologyUuid string) (*TapiCommon_Context_TopologyContext_NwTopologyService_Topology, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Topology == nil {
t.Topology = make(map[string]*TapiCommon_Context_TopologyContext_NwTopologyService_Topology)
}
key := TopologyUuid
// 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.Topology[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Topology", key)
}
t.Topology[key] = &TapiCommon_Context_TopologyContext_NwTopologyService_Topology{
TopologyUuid: &TopologyUuid,
}
return t.Topology[key], nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_TopologyContext_NwTopologyService) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_TopologyContext_NwTopologyService"], 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_TopologyContext_NwTopologyService) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_TopologyContext_NwTopologyService_Name represents the /tapi-common/context/topology-context/nw-topology-service/name YANG schema element.
type TapiCommon_Context_TopologyContext_NwTopologyService_Name struct {
Value *string `path:"value" module:"tapi-topology"`
ValueName *string `path:"value-name" module:"tapi-topology"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_TopologyContext_NwTopologyService_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_TopologyContext_NwTopologyService_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_TopologyContext_NwTopologyService_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_TopologyContext_NwTopologyService_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_TopologyContext_NwTopologyService_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_TopologyContext_NwTopologyService_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_TopologyContext_NwTopologyService_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
// TapiCommon_Context_TopologyContext_NwTopologyService_Topology represents the /tapi-common/context/topology-context/nw-topology-service/topology YANG schema element.
type TapiCommon_Context_TopologyContext_NwTopologyService_Topology struct {
TopologyUuid *string `path:"topology-uuid" module:"tapi-topology"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_TopologyContext_NwTopologyService_Topology 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_TopologyContext_NwTopologyService_Topology) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_TopologyContext_NwTopologyService_Topology struct, which is a YANG list entry.
func (t *TapiCommon_Context_TopologyContext_NwTopologyService_Topology) ΛListKeyMap() (map[string]interface{}, error) {
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_TopologyContext_NwTopologyService_Topology) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_TopologyContext_NwTopologyService_Topology"], 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_TopologyContext_NwTopologyService_Topology) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_TopologyContext_Topology represents the /tapi-common/context/topology-context/topology YANG schema element.
type TapiCommon_Context_TopologyContext_Topology struct {
BoundaryNodeEdgePoint map[TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint_Key]*TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint `path:"boundary-node-edge-point" module:"tapi-topology"`
LayerProtocolName []E_TapiTopology_LayerProtocolName `path:"layer-protocol-name" module:"tapi-topology"`
Link map[string]*TapiCommon_Context_TopologyContext_Topology_Link `path:"link" module:"tapi-topology"`
Name map[string]*TapiCommon_Context_TopologyContext_Topology_Name `path:"name" module:"tapi-topology"`
Node map[string]*TapiCommon_Context_TopologyContext_Topology_Node `path:"node" module:"tapi-topology"`
Uuid *string `path:"uuid" module:"tapi-topology"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_TopologyContext_Topology 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_TopologyContext_Topology) IsYANGGoStruct() {}
// TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint_Key represents the key for list BoundaryNodeEdgePoint of element /tapi-common/context/topology-context/topology.
type TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint_Key struct {
TopologyUuid string `path:"topology-uuid"`
NodeUuid string `path:"node-uuid"`
NodeEdgePointUuid string `path:"node-edge-point-uuid"`
}
// NewBoundaryNodeEdgePoint creates a new entry in the BoundaryNodeEdgePoint list of the
// TapiCommon_Context_TopologyContext_Topology struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_TopologyContext_Topology) NewBoundaryNodeEdgePoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string) (*TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.BoundaryNodeEdgePoint == nil {
t.BoundaryNodeEdgePoint = make(map[TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint_Key]*TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint)
key := TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint_Key{
TopologyUuid: TopologyUuid,
NodeUuid: NodeUuid,
NodeEdgePointUuid: NodeEdgePointUuid,
}
// 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.BoundaryNodeEdgePoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list BoundaryNodeEdgePoint", key)
t.BoundaryNodeEdgePoint[key] = &TapiCommon_Context_TopologyContext_Topology_BoundaryNodeEdgePoint{
TopologyUuid: &TopologyUuid,
NodeUuid: &NodeUuid,
NodeEdgePointUuid: &NodeEdgePointUuid,
}
return t.BoundaryNodeEdgePoint[key], nil
// NewLink creates a new entry in the Link list of the
// TapiCommon_Context_TopologyContext_Topology struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_TopologyContext_Topology) NewLink(Uuid string) (*TapiCommon_Context_TopologyContext_Topology_Link, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Link == nil {
t.Link = make(map[string]*TapiCommon_Context_TopologyContext_Topology_Link)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Link[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Link", key)
t.Link[key] = &TapiCommon_Context_TopologyContext_Topology_Link{
Uuid: &Uuid,
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_TopologyContext_Topology struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_TopologyContext_Topology) NewName(ValueName string) (*TapiCommon_Context_TopologyContext_Topology_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_TopologyContext_Topology_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_TopologyContext_Topology_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
}
// NewNode creates a new entry in the Node list of the
// TapiCommon_Context_TopologyContext_Topology struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_TopologyContext_Topology) NewNode(Uuid string) (*TapiCommon_Context_TopologyContext_Topology_Node, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Node == nil {
t.Node = make(map[string]*TapiCommon_Context_TopologyContext_Topology_Node)
Loading
Loading full blame...