Documentation
¶
Overview ¶
Package ctestschema 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 true in this case).
This package was generated by /usr/local/google/home/wenbli/gocode/src/github.com/openconfig/ygot/genutil/names.go using the following YANG input files:
- ../yang/ctestschema.yang
Imported modules were sourced from:
- ...
Index ¶
- Variables
- func Schema() (*ytypes.Schema, error)
- func Unmarshal(data []byte, destStruct ygot.GoStruct, opts ...ytypes.UnmarshalOpt) error
- func UnzipSchema() (map[string]*yang.Entry, error)
- type Binary
- type Device
- func (s *Device) AppendNewOrderedList(Key string) (*OrderedList, error)
- func (s *Device) AppendNewOrderedMultikeyedList(Key1 string, Key2 uint64) (*OrderedMultikeyedList, error)
- func (s *Device) AppendOrderedList(v *OrderedList) error
- func (s *Device) AppendOrderedMultikeyedList(v *OrderedMultikeyedList) error
- func (t *Device) AppendUnorderedList(v *UnorderedList) error
- func (s *Device) DeleteOrderedList(Key string) bool
- func (s *Device) DeleteOrderedMultikeyedList(Key1 string, Key2 uint64) bool
- func (t *Device) GetOrCreateUnorderedList(Key string) *UnorderedList
- func (s *Device) GetOrderedList(Key string) *OrderedList
- func (s *Device) GetOrderedMultikeyedList(Key1 string, Key2 uint64) *OrderedMultikeyedList
- func (t *Device) GetUnorderedList(Key string) *UnorderedList
- func (*Device) IsYANGGoStruct()
- func (t *Device) NewUnorderedList(Key string) (*UnorderedList, error)
- func (t *Device) RenameUnorderedList(oldK, newK string) error
- func (t *Device) Validate(opts ...ygot.ValidationOption) error
- func (*Device) ΛBelongingModule() string
- func (t *Device) ΛEnumTypeMap() map[string][]reflect.Type
- func (t *Device) ΛValidate(opts ...ygot.ValidationOption) error
- type OrderedList
- func (t *OrderedList) GetKey() string
- func (t *OrderedList) GetValue() string
- func (*OrderedList) IsYANGGoStruct()
- func (t *OrderedList) Validate(opts ...ygot.ValidationOption) error
- func (*OrderedList) ΛBelongingModule() string
- func (t *OrderedList) ΛEnumTypeMap() map[string][]reflect.Type
- func (t *OrderedList) ΛListKeyMap() (map[string]interface{}, error)
- func (t *OrderedList) ΛValidate(opts ...ygot.ValidationOption) error
- type OrderedList_OrderedMap
- func (o *OrderedList_OrderedMap) Append(v *OrderedList) error
- func (o *OrderedList_OrderedMap) AppendNew(Key string) (*OrderedList, error)
- func (o *OrderedList_OrderedMap) Delete(key string) bool
- func (o *OrderedList_OrderedMap) Get(key string) *OrderedList
- func (*OrderedList_OrderedMap) IsYANGOrderedList()
- func (o *OrderedList_OrderedMap) Keys() []string
- func (o *OrderedList_OrderedMap) Len() int
- func (o *OrderedList_OrderedMap) Values() []*OrderedList
- type OrderedMultikeyedList
- func (t *OrderedMultikeyedList) GetKey1() string
- func (t *OrderedMultikeyedList) GetKey2() uint64
- func (t *OrderedMultikeyedList) GetValue() string
- func (*OrderedMultikeyedList) IsYANGGoStruct()
- func (t *OrderedMultikeyedList) Validate(opts ...ygot.ValidationOption) error
- func (*OrderedMultikeyedList) ΛBelongingModule() string
- func (t *OrderedMultikeyedList) ΛEnumTypeMap() map[string][]reflect.Type
- func (t *OrderedMultikeyedList) ΛListKeyMap() (map[string]interface{}, error)
- func (t *OrderedMultikeyedList) ΛValidate(opts ...ygot.ValidationOption) error
- type OrderedMultikeyedList_Key
- type OrderedMultikeyedList_OrderedMap
- func (o *OrderedMultikeyedList_OrderedMap) Append(v *OrderedMultikeyedList) error
- func (o *OrderedMultikeyedList_OrderedMap) AppendNew(Key1 string, Key2 uint64) (*OrderedMultikeyedList, error)
- func (o *OrderedMultikeyedList_OrderedMap) Delete(key OrderedMultikeyedList_Key) bool
- func (o *OrderedMultikeyedList_OrderedMap) Get(key OrderedMultikeyedList_Key) *OrderedMultikeyedList
- func (*OrderedMultikeyedList_OrderedMap) IsYANGOrderedList()
- func (o *OrderedMultikeyedList_OrderedMap) Keys() []OrderedMultikeyedList_Key
- func (o *OrderedMultikeyedList_OrderedMap) Len() int
- func (o *OrderedMultikeyedList_OrderedMap) Values() []*OrderedMultikeyedList
- type UnionBool
- type UnionFloat64
- type UnionInt8
- type UnionInt16
- type UnionInt32
- type UnionInt64
- type UnionString
- type UnionUint8
- type UnionUint16
- type UnionUint32
- type UnionUint64
- type UnionUnsupported
- type UnorderedList
- func (t *UnorderedList) GetKey() string
- func (t *UnorderedList) GetValue() string
- func (*UnorderedList) IsYANGGoStruct()
- func (t *UnorderedList) Validate(opts ...ygot.ValidationOption) error
- func (*UnorderedList) ΛBelongingModule() string
- func (t *UnorderedList) ΛEnumTypeMap() map[string][]reflect.Type
- func (t *UnorderedList) ΛListKeyMap() (map[string]interface{}, error)
- func (t *UnorderedList) ΛValidate(opts ...ygot.ValidationOption) error
- type YANGEmpty
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Unmarshal ¶
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.
Types ¶
type Binary ¶
type Binary []byte
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 Device ¶
type Device struct {
ΛMetadata []ygot.Annotation `path:"@" ygotAnnotation:"true"`
OrderedList *OrderedList_OrderedMap `path:"ordered-lists/ordered-list" module:"ctestschema/ctestschema"`
ΛOrderedList []ygot.Annotation `path:"ordered-lists/@ordered-list" ygotAnnotation:"true"`
OrderedMultikeyedList *OrderedMultikeyedList_OrderedMap `path:"ordered-multikeyed-lists/ordered-multikeyed-list" module:"ctestschema/ctestschema"`
ΛOrderedMultikeyedList []ygot.Annotation `path:"ordered-multikeyed-lists/@ordered-multikeyed-list" ygotAnnotation:"true"`
UnorderedList map[string]*UnorderedList `path:"unordered-lists/unordered-list" module:"ctestschema/ctestschema"`
ΛUnorderedList []ygot.Annotation `path:"unordered-lists/@unordered-list" ygotAnnotation:"true"`
}
Device represents the /device YANG schema element.
func (*Device) AppendNewOrderedList ¶
func (s *Device) AppendNewOrderedList(Key string) (*OrderedList, error)
AppendNewOrderedList creates a new entry in the OrderedList ordered map of the Device struct. The keys of the list are populated from the input arguments.
func (*Device) AppendNewOrderedMultikeyedList ¶
func (s *Device) AppendNewOrderedMultikeyedList(Key1 string, Key2 uint64) (*OrderedMultikeyedList, error)
AppendNewOrderedMultikeyedList creates a new entry in the OrderedMultikeyedList ordered map of the Device struct. The keys of the list are populated from the input arguments.
func (*Device) AppendOrderedList ¶
func (s *Device) AppendOrderedList(v *OrderedList) error
AppendOrderedList appends the supplied OrderedList struct to the list OrderedList of Device. If the key value(s) specified in the supplied OrderedList already exist in the list, an error is returned.
func (*Device) AppendOrderedMultikeyedList ¶
func (s *Device) AppendOrderedMultikeyedList(v *OrderedMultikeyedList) error
AppendOrderedMultikeyedList appends the supplied OrderedMultikeyedList struct to the list OrderedMultikeyedList of Device. If the key value(s) specified in the supplied OrderedMultikeyedList already exist in the list, an error is returned.
func (*Device) AppendUnorderedList ¶
func (t *Device) AppendUnorderedList(v *UnorderedList) error
AppendUnorderedList appends the supplied UnorderedList struct to the list UnorderedList of Device. If the key value(s) specified in the supplied UnorderedList already exist in the list, an error is returned.
func (*Device) DeleteOrderedList ¶
DeleteOrderedList deletes the value with the specified keys from the receiver Device. If there is no such element, the function is a no-op.
func (*Device) DeleteOrderedMultikeyedList ¶
DeleteOrderedMultikeyedList deletes the value with the specified keys from the receiver Device. If there is no such element, the function is a no-op.
func (*Device) GetOrCreateUnorderedList ¶
func (t *Device) GetOrCreateUnorderedList(Key string) *UnorderedList
GetOrCreateUnorderedList retrieves the value with the specified keys from the receiver Device. If the entry does not exist, then it is created. It returns the existing or new list member.
func (*Device) GetOrderedList ¶
func (s *Device) GetOrderedList(Key string) *OrderedList
GetOrderedList retrieves the value with the specified key from the OrderedList map field of Device. If the receiver is nil, or the specified key is not present in the list, nil is returned such that Get* methods may be safely chained.
func (*Device) GetOrderedMultikeyedList ¶
func (s *Device) GetOrderedMultikeyedList(Key1 string, Key2 uint64) *OrderedMultikeyedList
GetOrderedMultikeyedList retrieves the value with the specified key from the OrderedMultikeyedList map field of Device. If the receiver is nil, or the specified key is not present in the list, nil is returned such that Get* methods may be safely chained.
func (*Device) GetUnorderedList ¶
func (t *Device) GetUnorderedList(Key string) *UnorderedList
GetUnorderedList retrieves the value with the specified key from the UnorderedList map field of Device. If the receiver is nil, or the specified key is not present in the list, nil is returned such that Get* methods may be safely chained.
func (*Device) IsYANGGoStruct ¶
func (*Device) IsYANGGoStruct()
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) NewUnorderedList ¶
func (t *Device) NewUnorderedList(Key string) (*UnorderedList, error)
NewUnorderedList creates a new entry in the UnorderedList list of the Device struct. The keys of the list are populated from the input arguments.
func (*Device) RenameUnorderedList ¶
RenameUnorderedList renames an entry in the list UnorderedList within the Device struct. The entry with key oldK is renamed to newK updating the key within the value.
func (*Device) Validate ¶
func (t *Device) Validate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.
func (*Device) ΛBelongingModule ¶
ΛBelongingModule returns the name of the module that defines the namespace of Device.
func (*Device) ΛEnumTypeMap ¶
ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types that are included in the generated code.
type OrderedList ¶
type OrderedList struct {
ΛMetadata []ygot.Annotation `path:"@" ygotAnnotation:"true"`
Key *string `path:"config/key|key" module:"ctestschema/ctestschema|ctestschema"`
ΛKey []ygot.Annotation `path:"config/@key|@key" ygotAnnotation:"true"`
Value *string `path:"config/value" module:"ctestschema/ctestschema"`
ΛValue []ygot.Annotation `path:"config/@value" ygotAnnotation:"true"`
}
OrderedList represents the /ctestschema/ordered-lists/ordered-list YANG schema element.
func (*OrderedList) GetKey ¶
func (t *OrderedList) GetKey() string
GetKey retrieves the value of the leaf Key from the OrderedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Key is set, it can safely use t.GetKey() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Key == nil' before retrieving the leaf's value.
func (*OrderedList) GetValue ¶
func (t *OrderedList) GetValue() string
GetValue retrieves the value of the leaf Value from the OrderedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Value is set, it can safely use t.GetValue() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Value == nil' before retrieving the leaf's value.
func (*OrderedList) IsYANGGoStruct ¶
func (*OrderedList) IsYANGGoStruct()
IsYANGGoStruct ensures that OrderedList implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.
func (*OrderedList) Validate ¶
func (t *OrderedList) Validate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.
func (*OrderedList) ΛBelongingModule ¶
func (*OrderedList) ΛBelongingModule() string
ΛBelongingModule returns the name of the module that defines the namespace of OrderedList.
func (*OrderedList) ΛEnumTypeMap ¶
func (t *OrderedList) ΛEnumTypeMap() map[string][]reflect.Type
ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types that are included in the generated code.
func (*OrderedList) ΛListKeyMap ¶
func (t *OrderedList) ΛListKeyMap() (map[string]interface{}, error)
ΛListKeyMap returns the keys of the OrderedList struct, which is a YANG list entry.
func (*OrderedList) ΛValidate ¶
func (t *OrderedList) ΛValidate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.
type OrderedList_OrderedMap ¶
type OrderedList_OrderedMap struct {
// contains filtered or unexported fields
}
OrderedList_OrderedMap is an ordered map that represents the "ordered-by user" list elements at /ctestschema/ordered-lists/ordered-list.
func (*OrderedList_OrderedMap) Append ¶
func (o *OrderedList_OrderedMap) Append(v *OrderedList) error
Append appends a OrderedList, returning an error if the key already exists in the ordered list or if the key is unspecified.
func (*OrderedList_OrderedMap) AppendNew ¶
func (o *OrderedList_OrderedMap) AppendNew(Key string) (*OrderedList, error)
AppendNew creates and appends a new OrderedList, returning the newly-initialized v. It returns an error if the v already exists.
func (*OrderedList_OrderedMap) Delete ¶
func (o *OrderedList_OrderedMap) Delete(key string) bool
Delete deletes an element.
func (*OrderedList_OrderedMap) Get ¶
func (o *OrderedList_OrderedMap) Get(key string) *OrderedList
Get returns the value corresponding to the key. If the key is not found, nil is returned.
func (*OrderedList_OrderedMap) IsYANGOrderedList ¶
func (*OrderedList_OrderedMap) IsYANGOrderedList()
IsYANGOrderedList ensures that OrderedList_OrderedMap implements the ygot.GoOrderedList interface.
func (*OrderedList_OrderedMap) Keys ¶
func (o *OrderedList_OrderedMap) Keys() []string
Keys returns a copy of the list's keys.
func (*OrderedList_OrderedMap) Len ¶
func (o *OrderedList_OrderedMap) Len() int
Len returns a size of OrderedList_OrderedMap
func (*OrderedList_OrderedMap) Values ¶
func (o *OrderedList_OrderedMap) Values() []*OrderedList
Values returns the current set of the list's values in order.
type OrderedMultikeyedList ¶
type OrderedMultikeyedList struct {
ΛMetadata []ygot.Annotation `path:"@" ygotAnnotation:"true"`
Key1 *string `path:"config/key1|key1" module:"ctestschema/ctestschema|ctestschema"`
ΛKey1 []ygot.Annotation `path:"config/@key1|@key1" ygotAnnotation:"true"`
Key2 *uint64 `path:"config/key2|key2" module:"ctestschema/ctestschema|ctestschema"`
ΛKey2 []ygot.Annotation `path:"config/@key2|@key2" ygotAnnotation:"true"`
Value *string `path:"config/value" module:"ctestschema/ctestschema"`
ΛValue []ygot.Annotation `path:"config/@value" ygotAnnotation:"true"`
}
OrderedMultikeyedList represents the /ctestschema/ordered-multikeyed-lists/ordered-multikeyed-list YANG schema element.
func (*OrderedMultikeyedList) GetKey1 ¶
func (t *OrderedMultikeyedList) GetKey1() string
GetKey1 retrieves the value of the leaf Key1 from the OrderedMultikeyedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Key1 is set, it can safely use t.GetKey1() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Key1 == nil' before retrieving the leaf's value.
func (*OrderedMultikeyedList) GetKey2 ¶
func (t *OrderedMultikeyedList) GetKey2() uint64
GetKey2 retrieves the value of the leaf Key2 from the OrderedMultikeyedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Key2 is set, it can safely use t.GetKey2() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Key2 == nil' before retrieving the leaf's value.
func (*OrderedMultikeyedList) GetValue ¶
func (t *OrderedMultikeyedList) GetValue() string
GetValue retrieves the value of the leaf Value from the OrderedMultikeyedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Value is set, it can safely use t.GetValue() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Value == nil' before retrieving the leaf's value.
func (*OrderedMultikeyedList) IsYANGGoStruct ¶
func (*OrderedMultikeyedList) IsYANGGoStruct()
IsYANGGoStruct ensures that OrderedMultikeyedList implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.
func (*OrderedMultikeyedList) Validate ¶
func (t *OrderedMultikeyedList) Validate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.
func (*OrderedMultikeyedList) ΛBelongingModule ¶
func (*OrderedMultikeyedList) ΛBelongingModule() string
ΛBelongingModule returns the name of the module that defines the namespace of OrderedMultikeyedList.
func (*OrderedMultikeyedList) ΛEnumTypeMap ¶
func (t *OrderedMultikeyedList) ΛEnumTypeMap() map[string][]reflect.Type
ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types that are included in the generated code.
func (*OrderedMultikeyedList) ΛListKeyMap ¶
func (t *OrderedMultikeyedList) ΛListKeyMap() (map[string]interface{}, error)
ΛListKeyMap returns the keys of the OrderedMultikeyedList struct, which is a YANG list entry.
func (*OrderedMultikeyedList) ΛValidate ¶
func (t *OrderedMultikeyedList) ΛValidate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.
type OrderedMultikeyedList_Key ¶
OrderedMultikeyedList_Key represents the key for list OrderedMultikeyedList of element /device.
func (OrderedMultikeyedList_Key) IsYANGGoKeyStruct ¶
func (OrderedMultikeyedList_Key) IsYANGGoKeyStruct()
IsYANGGoKeyStruct ensures that OrderedMultikeyedList_Key partially implements the yang.GoKeyStruct interface. This allows functions that need to handle this key struct to identify it as being generated by gogen.
func (OrderedMultikeyedList_Key) ΛListKeyMap ¶
func (t OrderedMultikeyedList_Key) ΛListKeyMap() (map[string]interface{}, error)
ΛListKeyMap returns the values of the OrderedMultikeyedList_Key key struct.
type OrderedMultikeyedList_OrderedMap ¶
type OrderedMultikeyedList_OrderedMap struct {
// contains filtered or unexported fields
}
OrderedMultikeyedList_OrderedMap is an ordered map that represents the "ordered-by user" list elements at /ctestschema/ordered-multikeyed-lists/ordered-multikeyed-list.
func (*OrderedMultikeyedList_OrderedMap) Append ¶
func (o *OrderedMultikeyedList_OrderedMap) Append(v *OrderedMultikeyedList) error
Append appends a OrderedMultikeyedList, returning an error if the key already exists in the ordered list or if the key is unspecified.
func (*OrderedMultikeyedList_OrderedMap) AppendNew ¶
func (o *OrderedMultikeyedList_OrderedMap) AppendNew(Key1 string, Key2 uint64) (*OrderedMultikeyedList, error)
AppendNew creates and appends a new OrderedMultikeyedList, returning the newly-initialized v. It returns an error if the v already exists.
func (*OrderedMultikeyedList_OrderedMap) Delete ¶
func (o *OrderedMultikeyedList_OrderedMap) Delete(key OrderedMultikeyedList_Key) bool
Delete deletes an element.
func (*OrderedMultikeyedList_OrderedMap) Get ¶
func (o *OrderedMultikeyedList_OrderedMap) Get(key OrderedMultikeyedList_Key) *OrderedMultikeyedList
Get returns the value corresponding to the key. If the key is not found, nil is returned.
func (*OrderedMultikeyedList_OrderedMap) IsYANGOrderedList ¶
func (*OrderedMultikeyedList_OrderedMap) IsYANGOrderedList()
IsYANGOrderedList ensures that OrderedMultikeyedList_OrderedMap implements the ygot.GoOrderedList interface.
func (*OrderedMultikeyedList_OrderedMap) Keys ¶
func (o *OrderedMultikeyedList_OrderedMap) Keys() []OrderedMultikeyedList_Key
Keys returns a copy of the list's keys.
func (*OrderedMultikeyedList_OrderedMap) Len ¶
func (o *OrderedMultikeyedList_OrderedMap) Len() int
Len returns a size of OrderedMultikeyedList_OrderedMap
func (*OrderedMultikeyedList_OrderedMap) Values ¶
func (o *OrderedMultikeyedList_OrderedMap) Values() []*OrderedMultikeyedList
Values returns the current set of the list's values in order.
type UnionBool ¶
type UnionBool bool
UnionBool is a bool type assignable to unions of which it is a subtype.
type UnionFloat64 ¶
type UnionFloat64 float64
UnionFloat64 is a float64 type assignable to unions of which it is a subtype.
type UnionInt8 ¶
type UnionInt8 int8
UnionInt8 is an int8 type assignable to unions of which it is a subtype.
type UnionInt16 ¶
type UnionInt16 int16
UnionInt16 is an int16 type assignable to unions of which it is a subtype.
type UnionInt32 ¶
type UnionInt32 int32
UnionInt32 is an int32 type assignable to unions of which it is a subtype.
type UnionInt64 ¶
type UnionInt64 int64
UnionInt64 is an int64 type assignable to unions of which it is a subtype.
type UnionString ¶
type UnionString string
UnionString is a string type assignable to unions of which it is a subtype.
type UnionUint8 ¶
type UnionUint8 uint8
UnionUint8 is a uint8 type assignable to unions of which it is a subtype.
type UnionUint16 ¶
type UnionUint16 uint16
UnionUint16 is a uint16 type assignable to unions of which it is a subtype.
type UnionUint32 ¶
type UnionUint32 uint32
UnionUint32 is a uint32 type assignable to unions of which it is a subtype.
type UnionUint64 ¶
type UnionUint64 uint64
UnionUint64 is a uint64 type assignable to unions of which it is a subtype.
type UnionUnsupported ¶
type UnionUnsupported struct {
Value interface{}
}
UnionUnsupported is an interface{} wrapper type for unsupported types. It is assignable to unions of which it is a subtype.
type UnorderedList ¶
type UnorderedList struct {
ΛMetadata []ygot.Annotation `path:"@" ygotAnnotation:"true"`
Key *string `path:"config/key|key" module:"ctestschema/ctestschema|ctestschema"`
ΛKey []ygot.Annotation `path:"config/@key|@key" ygotAnnotation:"true"`
Value *string `path:"config/value" module:"ctestschema/ctestschema"`
ΛValue []ygot.Annotation `path:"config/@value" ygotAnnotation:"true"`
}
UnorderedList represents the /ctestschema/unordered-lists/unordered-list YANG schema element.
func (*UnorderedList) GetKey ¶
func (t *UnorderedList) GetKey() string
GetKey retrieves the value of the leaf Key from the UnorderedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Key is set, it can safely use t.GetKey() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Key == nil' before retrieving the leaf's value.
func (*UnorderedList) GetValue ¶
func (t *UnorderedList) GetValue() string
GetValue retrieves the value of the leaf Value from the UnorderedList struct. If the field is unset but has a default value in the YANG schema, then the default value will be returned. Caution should be exercised whilst using this method since when without a default value, it will return the Go zero value if the field is explicitly unset. If the caller explicitly does not care if Value is set, it can safely use t.GetValue() to retrieve the value. In the case that the caller has different actions based on whether the leaf is set or unset, it should use 'if t.Value == nil' before retrieving the leaf's value.
func (*UnorderedList) IsYANGGoStruct ¶
func (*UnorderedList) IsYANGGoStruct()
IsYANGGoStruct ensures that UnorderedList implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.
func (*UnorderedList) Validate ¶
func (t *UnorderedList) Validate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.
func (*UnorderedList) ΛBelongingModule ¶
func (*UnorderedList) ΛBelongingModule() string
ΛBelongingModule returns the name of the module that defines the namespace of UnorderedList.
func (*UnorderedList) ΛEnumTypeMap ¶
func (t *UnorderedList) ΛEnumTypeMap() map[string][]reflect.Type
ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types that are included in the generated code.
func (*UnorderedList) ΛListKeyMap ¶
func (t *UnorderedList) ΛListKeyMap() (map[string]interface{}, error)
ΛListKeyMap returns the keys of the UnorderedList struct, which is a YANG list entry.
func (*UnorderedList) ΛValidate ¶
func (t *UnorderedList) ΛValidate(opts ...ygot.ValidationOption) error
Validate validates s against the YANG schema corresponding to its type.