exampleocunordered

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package exampleocunordered 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 ygnmi version: (devel): (ygot: v0.29.17) using the following YANG input files:

  • ../../pathgen/testdata/yang/openconfig-simple.yang
  • ../../pathgen/testdata/yang/openconfig-withlistval.yang
  • ../../pathgen/testdata/yang/openconfig-nested.yang

Imported modules were sourced from:

Package exampleocunordered 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 ygnmi version: (devel): (ygot: v0.29.17) using the following YANG input files:

  • ../../pathgen/testdata/yang/openconfig-simple.yang
  • ../../pathgen/testdata/yang/openconfig-withlistval.yang
  • ../../pathgen/testdata/yang/openconfig-nested.yang

Imported modules were sourced from:

Package exampleocunordered 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 ygnmi version: (devel): (ygot: v0.29.17) using the following YANG input files:

  • ../../pathgen/testdata/yang/openconfig-simple.yang
  • ../../pathgen/testdata/yang/openconfig-withlistval.yang
  • ../../pathgen/testdata/yang/openconfig-nested.yang

Imported modules were sourced from:

Package exampleocunordered 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 ygnmi version: (devel): (ygot: v0.29.17) using the following YANG input files:

  • ../../pathgen/testdata/yang/openconfig-simple.yang
  • ../../pathgen/testdata/yang/openconfig-withlistval.yang
  • ../../pathgen/testdata/yang/openconfig-nested.yang

Imported modules were sourced from:

Package exampleocunordered 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 ygnmi version: (devel): (ygot: v0.29.17) using the following YANG input files:

  • ../../pathgen/testdata/yang/openconfig-simple.yang
  • ../../pathgen/testdata/yang/openconfig-withlistval.yang
  • ../../pathgen/testdata/yang/openconfig-nested.yang

Imported modules were sourced from:

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemaTree map[string]*yang.Entry
	ΛEnumTypes map[string][]reflect.Type
)
View Source
var ΛEnum = map[string]map[int64]ygot.EnumDefinition{
	"E_Child_Three": {
		1: {Name: "ONE"},
		2: {Name: "TWO"},
	},
}

ΛEnum is a map, keyed by the name of the type defined for each enum in the generated Go code, which provides a mapping between the constant int64 value of each value of the enumeration, and the string that is used to represent it in the YANG schema. The map is named ΛEnum in order to avoid clash with any valid YANG identifier.

Functions

func Schema

func Schema() (*ytypes.Schema, error)

Schema returns the details of the generated schema.

func Unmarshal

func Unmarshal(data []byte, destStruct ygot.GoStruct, opts ...ytypes.UnmarshalOpt) error

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 UnzipSchema

func UnzipSchema() (map[string]*yang.Entry, error)

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.

Types

type A

type A struct {
	B *A_B `path:"b" module:"openconfig-nested"`
}

A represents the /openconfig-nested/a YANG schema element.

func (*A) GetB

func (t *A) GetB() *A_B

GetB returns the value of the B struct pointer from A. If the receiver or the field B is nil, nil is returned such that the Get* methods can be safely chained.

func (*A) GetOrCreateB

func (t *A) GetOrCreateB() *A_B

GetOrCreateB retrieves the value of the B field or returns the existing field if it already exists.

func (*A) IsYANGGoStruct

func (*A) IsYANGGoStruct()

IsYANGGoStruct ensures that A implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A) PopulateDefaults

func (t *A) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A) Validate

func (t *A) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A) ΛBelongingModule

func (*A) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A.

func (*A) ΛEnumTypeMap

func (t *A) Λ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 (*A) ΛValidate

func (t *A) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B

type A_B struct {
	C *A_B_C `path:"c" module:"openconfig-nested"`
}

A_B represents the /openconfig-nested/a/b YANG schema element.

func (*A_B) GetC

func (t *A_B) GetC() *A_B_C

GetC returns the value of the C struct pointer from A_B. If the receiver or the field C is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B) GetOrCreateC

func (t *A_B) GetOrCreateC() *A_B_C

GetOrCreateC retrieves the value of the C field or returns the existing field if it already exists.

func (*A_B) IsYANGGoStruct

func (*A_B) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B) PopulateDefaults

func (t *A_B) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B) Validate

func (t *A_B) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B) ΛBelongingModule

func (*A_B) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B.

func (*A_B) ΛEnumTypeMap

func (t *A_B) Λ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 (*A_B) ΛValidate

func (t *A_B) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C

type A_B_C struct {
	D *A_B_C_D `path:"d" module:"openconfig-nested"`
}

A_B_C represents the /openconfig-nested/a/b/c YANG schema element.

func (*A_B_C) GetD

func (t *A_B_C) GetD() *A_B_C_D

GetD returns the value of the D struct pointer from A_B_C. If the receiver or the field D is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C) GetOrCreateD

func (t *A_B_C) GetOrCreateD() *A_B_C_D

GetOrCreateD retrieves the value of the D field or returns the existing field if it already exists.

func (*A_B_C) IsYANGGoStruct

func (*A_B_C) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C) PopulateDefaults

func (t *A_B_C) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C) Validate

func (t *A_B_C) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C) ΛBelongingModule

func (*A_B_C) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C.

func (*A_B_C) ΛEnumTypeMap

func (t *A_B_C) Λ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 (*A_B_C) ΛValidate

func (t *A_B_C) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D

type A_B_C_D struct {
	E *A_B_C_D_E `path:"e" module:"openconfig-nested"`
}

A_B_C_D represents the /openconfig-nested/a/b/c/d YANG schema element.

func (*A_B_C_D) GetE

func (t *A_B_C_D) GetE() *A_B_C_D_E

GetE returns the value of the E struct pointer from A_B_C_D. If the receiver or the field E is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D) GetOrCreateE

func (t *A_B_C_D) GetOrCreateE() *A_B_C_D_E

GetOrCreateE retrieves the value of the E field or returns the existing field if it already exists.

func (*A_B_C_D) IsYANGGoStruct

func (*A_B_C_D) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D) PopulateDefaults

func (t *A_B_C_D) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D) Validate

func (t *A_B_C_D) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D) ΛBelongingModule

func (*A_B_C_D) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D.

func (*A_B_C_D) ΛEnumTypeMap

func (t *A_B_C_D) Λ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 (*A_B_C_D) ΛValidate

func (t *A_B_C_D) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E

type A_B_C_D_E struct {
	F *A_B_C_D_E_F `path:"f" module:"openconfig-nested"`
}

A_B_C_D_E represents the /openconfig-nested/a/b/c/d/e YANG schema element.

func (*A_B_C_D_E) GetF

func (t *A_B_C_D_E) GetF() *A_B_C_D_E_F

GetF returns the value of the F struct pointer from A_B_C_D_E. If the receiver or the field F is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E) GetOrCreateF

func (t *A_B_C_D_E) GetOrCreateF() *A_B_C_D_E_F

GetOrCreateF retrieves the value of the F field or returns the existing field if it already exists.

func (*A_B_C_D_E) IsYANGGoStruct

func (*A_B_C_D_E) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E) PopulateDefaults

func (t *A_B_C_D_E) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E) Validate

func (t *A_B_C_D_E) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E) ΛBelongingModule

func (*A_B_C_D_E) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E.

func (*A_B_C_D_E) ΛEnumTypeMap

func (t *A_B_C_D_E) Λ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 (*A_B_C_D_E) ΛValidate

func (t *A_B_C_D_E) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F

type A_B_C_D_E_F struct {
	G *A_B_C_D_E_F_G `path:"g" module:"openconfig-nested"`
}

A_B_C_D_E_F represents the /openconfig-nested/a/b/c/d/e/f YANG schema element.

func (*A_B_C_D_E_F) GetG

func (t *A_B_C_D_E_F) GetG() *A_B_C_D_E_F_G

GetG returns the value of the G struct pointer from A_B_C_D_E_F. If the receiver or the field G is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F) GetOrCreateG

func (t *A_B_C_D_E_F) GetOrCreateG() *A_B_C_D_E_F_G

GetOrCreateG retrieves the value of the G field or returns the existing field if it already exists.

func (*A_B_C_D_E_F) IsYANGGoStruct

func (*A_B_C_D_E_F) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F) PopulateDefaults

func (t *A_B_C_D_E_F) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F) Validate

func (t *A_B_C_D_E_F) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F) ΛBelongingModule

func (*A_B_C_D_E_F) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F.

func (*A_B_C_D_E_F) ΛEnumTypeMap

func (t *A_B_C_D_E_F) Λ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 (*A_B_C_D_E_F) ΛValidate

func (t *A_B_C_D_E_F) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G

type A_B_C_D_E_F_G struct {
	H *A_B_C_D_E_F_G_H `path:"h" module:"openconfig-nested"`
}

A_B_C_D_E_F_G represents the /openconfig-nested/a/b/c/d/e/f/g YANG schema element.

func (*A_B_C_D_E_F_G) GetH

func (t *A_B_C_D_E_F_G) GetH() *A_B_C_D_E_F_G_H

GetH returns the value of the H struct pointer from A_B_C_D_E_F_G. If the receiver or the field H is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F_G) GetOrCreateH

func (t *A_B_C_D_E_F_G) GetOrCreateH() *A_B_C_D_E_F_G_H

GetOrCreateH retrieves the value of the H field or returns the existing field if it already exists.

func (*A_B_C_D_E_F_G) IsYANGGoStruct

func (*A_B_C_D_E_F_G) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G) PopulateDefaults

func (t *A_B_C_D_E_F_G) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G) Validate

func (t *A_B_C_D_E_F_G) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G) ΛBelongingModule

func (*A_B_C_D_E_F_G) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G.

func (*A_B_C_D_E_F_G) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G) Λ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 (*A_B_C_D_E_F_G) ΛValidate

func (t *A_B_C_D_E_F_G) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G_H

type A_B_C_D_E_F_G_H struct {
	I *A_B_C_D_E_F_G_H_I `path:"i" module:"openconfig-nested"`
}

A_B_C_D_E_F_G_H represents the /openconfig-nested/a/b/c/d/e/f/g/h YANG schema element.

func (*A_B_C_D_E_F_G_H) GetI

GetI returns the value of the I struct pointer from A_B_C_D_E_F_G_H. If the receiver or the field I is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F_G_H) GetOrCreateI

func (t *A_B_C_D_E_F_G_H) GetOrCreateI() *A_B_C_D_E_F_G_H_I

GetOrCreateI retrieves the value of the I field or returns the existing field if it already exists.

func (*A_B_C_D_E_F_G_H) IsYANGGoStruct

func (*A_B_C_D_E_F_G_H) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G_H implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G_H) PopulateDefaults

func (t *A_B_C_D_E_F_G_H) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G_H with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G_H) Validate

func (t *A_B_C_D_E_F_G_H) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G_H) ΛBelongingModule

func (*A_B_C_D_E_F_G_H) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G_H.

func (*A_B_C_D_E_F_G_H) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G_H) Λ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 (*A_B_C_D_E_F_G_H) ΛValidate

func (t *A_B_C_D_E_F_G_H) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G_H_I

type A_B_C_D_E_F_G_H_I struct {
	J *A_B_C_D_E_F_G_H_I_J `path:"j" module:"openconfig-nested"`
}

A_B_C_D_E_F_G_H_I represents the /openconfig-nested/a/b/c/d/e/f/g/h/i YANG schema element.

func (*A_B_C_D_E_F_G_H_I) GetJ

GetJ returns the value of the J struct pointer from A_B_C_D_E_F_G_H_I. If the receiver or the field J is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F_G_H_I) GetOrCreateJ

func (t *A_B_C_D_E_F_G_H_I) GetOrCreateJ() *A_B_C_D_E_F_G_H_I_J

GetOrCreateJ retrieves the value of the J field or returns the existing field if it already exists.

func (*A_B_C_D_E_F_G_H_I) IsYANGGoStruct

func (*A_B_C_D_E_F_G_H_I) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G_H_I implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G_H_I) PopulateDefaults

func (t *A_B_C_D_E_F_G_H_I) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G_H_I with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G_H_I) Validate

func (t *A_B_C_D_E_F_G_H_I) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G_H_I) ΛBelongingModule

func (*A_B_C_D_E_F_G_H_I) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G_H_I.

func (*A_B_C_D_E_F_G_H_I) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G_H_I) Λ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 (*A_B_C_D_E_F_G_H_I) ΛValidate

func (t *A_B_C_D_E_F_G_H_I) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G_H_I_J

type A_B_C_D_E_F_G_H_I_J struct {
	K *A_B_C_D_E_F_G_H_I_J_K `path:"k" module:"openconfig-nested"`
}

A_B_C_D_E_F_G_H_I_J represents the /openconfig-nested/a/b/c/d/e/f/g/h/i/j YANG schema element.

func (*A_B_C_D_E_F_G_H_I_J) GetK

GetK returns the value of the K struct pointer from A_B_C_D_E_F_G_H_I_J. If the receiver or the field K is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F_G_H_I_J) GetOrCreateK

func (t *A_B_C_D_E_F_G_H_I_J) GetOrCreateK() *A_B_C_D_E_F_G_H_I_J_K

GetOrCreateK retrieves the value of the K field or returns the existing field if it already exists.

func (*A_B_C_D_E_F_G_H_I_J) IsYANGGoStruct

func (*A_B_C_D_E_F_G_H_I_J) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G_H_I_J implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G_H_I_J) PopulateDefaults

func (t *A_B_C_D_E_F_G_H_I_J) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G_H_I_J with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G_H_I_J) Validate

func (t *A_B_C_D_E_F_G_H_I_J) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G_H_I_J) ΛBelongingModule

func (*A_B_C_D_E_F_G_H_I_J) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G_H_I_J.

func (*A_B_C_D_E_F_G_H_I_J) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G_H_I_J) Λ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 (*A_B_C_D_E_F_G_H_I_J) ΛValidate

func (t *A_B_C_D_E_F_G_H_I_J) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G_H_I_J_K

type A_B_C_D_E_F_G_H_I_J_K struct {
	L *A_B_C_D_E_F_G_H_I_J_K_L `path:"l" module:"openconfig-nested"`
}

A_B_C_D_E_F_G_H_I_J_K represents the /openconfig-nested/a/b/c/d/e/f/g/h/i/j/k YANG schema element.

func (*A_B_C_D_E_F_G_H_I_J_K) GetL

GetL returns the value of the L struct pointer from A_B_C_D_E_F_G_H_I_J_K. If the receiver or the field L is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F_G_H_I_J_K) GetOrCreateL

GetOrCreateL retrieves the value of the L field or returns the existing field if it already exists.

func (*A_B_C_D_E_F_G_H_I_J_K) IsYANGGoStruct

func (*A_B_C_D_E_F_G_H_I_J_K) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G_H_I_J_K implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G_H_I_J_K) PopulateDefaults

func (t *A_B_C_D_E_F_G_H_I_J_K) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G_H_I_J_K with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G_H_I_J_K) Validate

func (t *A_B_C_D_E_F_G_H_I_J_K) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G_H_I_J_K) ΛBelongingModule

func (*A_B_C_D_E_F_G_H_I_J_K) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G_H_I_J_K.

func (*A_B_C_D_E_F_G_H_I_J_K) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G_H_I_J_K) Λ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 (*A_B_C_D_E_F_G_H_I_J_K) ΛValidate

func (t *A_B_C_D_E_F_G_H_I_J_K) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G_H_I_J_K_L

type A_B_C_D_E_F_G_H_I_J_K_L struct {
	M *A_B_C_D_E_F_G_H_I_J_K_L_M `path:"m" module:"openconfig-nested"`
}

A_B_C_D_E_F_G_H_I_J_K_L represents the /openconfig-nested/a/b/c/d/e/f/g/h/i/j/k/l YANG schema element.

func (*A_B_C_D_E_F_G_H_I_J_K_L) GetM

GetM returns the value of the M struct pointer from A_B_C_D_E_F_G_H_I_J_K_L. If the receiver or the field M is nil, nil is returned such that the Get* methods can be safely chained.

func (*A_B_C_D_E_F_G_H_I_J_K_L) GetOrCreateM

GetOrCreateM retrieves the value of the M field or returns the existing field if it already exists.

func (*A_B_C_D_E_F_G_H_I_J_K_L) IsYANGGoStruct

func (*A_B_C_D_E_F_G_H_I_J_K_L) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G_H_I_J_K_L implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G_H_I_J_K_L) PopulateDefaults

func (t *A_B_C_D_E_F_G_H_I_J_K_L) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G_H_I_J_K_L with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G_H_I_J_K_L) Validate

func (t *A_B_C_D_E_F_G_H_I_J_K_L) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G_H_I_J_K_L) ΛBelongingModule

func (*A_B_C_D_E_F_G_H_I_J_K_L) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G_H_I_J_K_L.

func (*A_B_C_D_E_F_G_H_I_J_K_L) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G_H_I_J_K_L) Λ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 (*A_B_C_D_E_F_G_H_I_J_K_L) ΛValidate

func (t *A_B_C_D_E_F_G_H_I_J_K_L) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type A_B_C_D_E_F_G_H_I_J_K_L_M

type A_B_C_D_E_F_G_H_I_J_K_L_M struct {
	Foo *string `path:"state/foo" module:"openconfig-nested/openconfig-nested"`
}

A_B_C_D_E_F_G_H_I_J_K_L_M represents the /openconfig-nested/a/b/c/d/e/f/g/h/i/j/k/l/m YANG schema element.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) GetFoo

func (t *A_B_C_D_E_F_G_H_I_J_K_L_M) GetFoo() string

GetFoo retrieves the value of the leaf Foo from the A_B_C_D_E_F_G_H_I_J_K_L_M 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 Foo is set, it can safely use t.GetFoo() 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.Foo == nil' before retrieving the leaf's value.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) IsYANGGoStruct

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) IsYANGGoStruct()

IsYANGGoStruct ensures that A_B_C_D_E_F_G_H_I_J_K_L_M implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) PopulateDefaults

func (t *A_B_C_D_E_F_G_H_I_J_K_L_M) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the A_B_C_D_E_F_G_H_I_J_K_L_M with default values as specified in the YANG schema, instantiating any nil container fields.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) SetFoo

func (t *A_B_C_D_E_F_G_H_I_J_K_L_M) SetFoo(v string)

SetFoo sets the value of the leaf Foo in the A_B_C_D_E_F_G_H_I_J_K_L_M struct.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) Validate

Validate validates s against the YANG schema corresponding to its type.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) ΛBelongingModule

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of A_B_C_D_E_F_G_H_I_J_K_L_M.

func (*A_B_C_D_E_F_G_H_I_J_K_L_M) ΛEnumTypeMap

func (t *A_B_C_D_E_F_G_H_I_J_K_L_M) Λ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 (*A_B_C_D_E_F_G_H_I_J_K_L_M) ΛValidate

func (t *A_B_C_D_E_F_G_H_I_J_K_L_M) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

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 Container added in v0.8.1

type Container struct {
	Enabled *bool `path:"enabled" module:"openconfig-nested"`
}

Container represents the /openconfig-nested/container YANG schema element.

func (*Container) GetEnabled added in v0.8.1

func (t *Container) GetEnabled() bool

GetEnabled retrieves the value of the leaf Enabled from the Container 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 Enabled is set, it can safely use t.GetEnabled() 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.Enabled == nil' before retrieving the leaf's value.

func (*Container) IsYANGGoStruct added in v0.8.1

func (*Container) IsYANGGoStruct()

IsYANGGoStruct ensures that Container implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Container) PopulateDefaults added in v0.8.1

func (t *Container) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Container with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Container) SetEnabled added in v0.8.1

func (t *Container) SetEnabled(v bool)

SetEnabled sets the value of the leaf Enabled in the Container struct.

func (*Container) Validate added in v0.8.1

func (t *Container) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Container) ΛBelongingModule added in v0.8.1

func (*Container) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Container.

func (*Container) ΛEnumTypeMap added in v0.8.1

func (t *Container) Λ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 (*Container) ΛValidate added in v0.8.1

func (t *Container) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type E_Child_Three

type E_Child_Three int64

E_Child_Three is a derived int64 type which is used to represent the enumerated node Child_Three. An additional value named Child_Three_UNSET is added to the enumeration which is used as the nil value, indicating that the enumeration was not explicitly set by the program importing the generated structures.

const (
	// Child_Three_UNSET corresponds to the value UNSET of Child_Three
	Child_Three_UNSET E_Child_Three = 0
	// Child_Three_ONE corresponds to the value ONE of Child_Three
	Child_Three_ONE E_Child_Three = 1
	// Child_Three_TWO corresponds to the value TWO of Child_Three
	Child_Three_TWO E_Child_Three = 2
)

func (E_Child_Three) IsYANGGoEnum

func (E_Child_Three) IsYANGGoEnum()

IsYANGGoEnum ensures that Child_Three implements the yang.GoEnum interface. This ensures that Child_Three can be identified as a mapped type for a YANG enumeration.

func (E_Child_Three) String

func (e E_Child_Three) String() string

String returns a logging-friendly string for E_Child_Three.

func (E_Child_Three) ΛMap

func (E_Child_Three) ΛMap() map[string]map[int64]ygot.EnumDefinition

ΛMap returns the value lookup map associated with Child_Three.

type Model

type Model struct {
	MultiKey  map[Model_MultiKey_Key]*Model_MultiKey `path:"b/multi-key" module:"openconfig-withlistval/openconfig-withlistval"`
	NoKey     []*Model_NoKey                         `path:"c/no-key" module:"openconfig-withlistval/openconfig-withlistval"`
	SingleKey map[string]*Model_SingleKey            `path:"a/single-key" module:"openconfig-withlistval/openconfig-withlistval"`
}

Model represents the /openconfig-withlistval/model YANG schema element.

func (*Model) AppendMultiKey

func (t *Model) AppendMultiKey(v *Model_MultiKey) error

AppendMultiKey appends the supplied Model_MultiKey struct to the list MultiKey of Model. If the key value(s) specified in the supplied Model_MultiKey already exist in the list, an error is returned.

func (*Model) AppendSingleKey

func (t *Model) AppendSingleKey(v *Model_SingleKey) error

AppendSingleKey appends the supplied Model_SingleKey struct to the list SingleKey of Model. If the key value(s) specified in the supplied Model_SingleKey already exist in the list, an error is returned.

func (*Model) DeleteMultiKey

func (t *Model) DeleteMultiKey(Key1 uint32, Key2 uint64)

DeleteMultiKey deletes the value with the specified keys from the receiver Model. If there is no such element, the function is a no-op.

func (*Model) DeleteSingleKey

func (t *Model) DeleteSingleKey(Key string)

DeleteSingleKey deletes the value with the specified keys from the receiver Model. If there is no such element, the function is a no-op.

func (*Model) GetMultiKey

func (t *Model) GetMultiKey(Key1 uint32, Key2 uint64) *Model_MultiKey

GetMultiKey retrieves the value with the specified key from the MultiKey map field of Model. 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 (*Model) GetOrCreateMultiKey

func (t *Model) GetOrCreateMultiKey(Key1 uint32, Key2 uint64) *Model_MultiKey

GetOrCreateMultiKey retrieves the value with the specified keys from the receiver Model. If the entry does not exist, then it is created. It returns the existing or new list member.

func (*Model) GetOrCreateSingleKey

func (t *Model) GetOrCreateSingleKey(Key string) *Model_SingleKey

GetOrCreateSingleKey retrieves the value with the specified keys from the receiver Model. If the entry does not exist, then it is created. It returns the existing or new list member.

func (*Model) GetSingleKey

func (t *Model) GetSingleKey(Key string) *Model_SingleKey

GetSingleKey retrieves the value with the specified key from the SingleKey map field of Model. 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 (*Model) IsYANGGoStruct

func (*Model) IsYANGGoStruct()

IsYANGGoStruct ensures that Model implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model) NewMultiKey

func (t *Model) NewMultiKey(Key1 uint32, Key2 uint64) (*Model_MultiKey, error)

NewMultiKey creates a new entry in the MultiKey list of the Model struct. The keys of the list are populated from the input arguments.

func (*Model) NewSingleKey

func (t *Model) NewSingleKey(Key string) (*Model_SingleKey, error)

NewSingleKey creates a new entry in the SingleKey list of the Model struct. The keys of the list are populated from the input arguments.

func (*Model) PopulateDefaults

func (t *Model) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model) RenameMultiKey added in v0.10.0

func (t *Model) RenameMultiKey(oldK, newK Model_MultiKey_Key) error

RenameMultiKey renames an entry in the list MultiKey within the Model struct. The entry with key oldK is renamed to newK updating the key within the value.

func (*Model) RenameSingleKey added in v0.10.0

func (t *Model) RenameSingleKey(oldK, newK string) error

RenameSingleKey renames an entry in the list SingleKey within the Model struct. The entry with key oldK is renamed to newK updating the key within the value.

func (*Model) Validate

func (t *Model) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Model) ΛBelongingModule

func (*Model) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model.

func (*Model) ΛEnumTypeMap

func (t *Model) Λ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 (*Model) ΛValidate

func (t *Model) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Model_MultiKey

type Model_MultiKey struct {
	Key1 *uint32 `` /* 216-byte string literal not displayed */
	Key2 *uint64 `` /* 216-byte string literal not displayed */
}

Model_MultiKey represents the /openconfig-withlistval/model/b/multi-key YANG schema element.

func (*Model_MultiKey) GetKey1

func (t *Model_MultiKey) GetKey1() uint32

GetKey1 retrieves the value of the leaf Key1 from the Model_MultiKey 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 (*Model_MultiKey) GetKey2

func (t *Model_MultiKey) GetKey2() uint64

GetKey2 retrieves the value of the leaf Key2 from the Model_MultiKey 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 (*Model_MultiKey) IsYANGGoStruct

func (*Model_MultiKey) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_MultiKey implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model_MultiKey) PopulateDefaults

func (t *Model_MultiKey) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model_MultiKey with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model_MultiKey) SetKey1

func (t *Model_MultiKey) SetKey1(v uint32)

SetKey1 sets the value of the leaf Key1 in the Model_MultiKey struct.

func (*Model_MultiKey) SetKey2

func (t *Model_MultiKey) SetKey2(v uint64)

SetKey2 sets the value of the leaf Key2 in the Model_MultiKey struct.

func (*Model_MultiKey) Validate

func (t *Model_MultiKey) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Model_MultiKey) ΛBelongingModule

func (*Model_MultiKey) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model_MultiKey.

func (*Model_MultiKey) ΛEnumTypeMap

func (t *Model_MultiKey) Λ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 (*Model_MultiKey) ΛListKeyMap

func (t *Model_MultiKey) ΛListKeyMap() (map[string]interface{}, error)

ΛListKeyMap returns the keys of the Model_MultiKey struct, which is a YANG list entry.

func (*Model_MultiKey) ΛValidate

func (t *Model_MultiKey) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Model_MultiKey_Key

type Model_MultiKey_Key struct {
	Key1 uint32 `path:"key1"`
	Key2 uint64 `path:"key2"`
}

Model_MultiKey_Key represents the key for list MultiKey of element /openconfig-withlistval/model.

func (Model_MultiKey_Key) IsYANGGoKeyStruct

func (Model_MultiKey_Key) IsYANGGoKeyStruct()

IsYANGGoKeyStruct ensures that Model_MultiKey_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 (Model_MultiKey_Key) ΛListKeyMap

func (t Model_MultiKey_Key) ΛListKeyMap() (map[string]interface{}, error)

ΛListKeyMap returns the values of the Model_MultiKey_Key key struct.

type Model_NoKey

type Model_NoKey struct {
	Foo *Model_NoKey_Foo `path:"foo" module:"openconfig-withlistval"`
}

Model_NoKey represents the /openconfig-withlistval/model/c/no-key YANG schema element.

func (*Model_NoKey) GetFoo

func (t *Model_NoKey) GetFoo() *Model_NoKey_Foo

GetFoo returns the value of the Foo struct pointer from Model_NoKey. If the receiver or the field Foo is nil, nil is returned such that the Get* methods can be safely chained.

func (*Model_NoKey) GetOrCreateFoo

func (t *Model_NoKey) GetOrCreateFoo() *Model_NoKey_Foo

GetOrCreateFoo retrieves the value of the Foo field or returns the existing field if it already exists.

func (*Model_NoKey) IsYANGGoStruct

func (*Model_NoKey) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_NoKey implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model_NoKey) PopulateDefaults

func (t *Model_NoKey) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model_NoKey with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model_NoKey) Validate

func (t *Model_NoKey) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Model_NoKey) ΛBelongingModule

func (*Model_NoKey) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model_NoKey.

func (*Model_NoKey) ΛEnumTypeMap

func (t *Model_NoKey) Λ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 (*Model_NoKey) ΛValidate

func (t *Model_NoKey) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Model_NoKey_Foo

type Model_NoKey_Foo struct {
	Key   *string `path:"state/key" module:"openconfig-withlistval/openconfig-withlistval"`
	Value *int64  `path:"state/value" module:"openconfig-withlistval/openconfig-withlistval"`
}

Model_NoKey_Foo represents the /openconfig-withlistval/model/c/no-key/foo YANG schema element.

func (*Model_NoKey_Foo) GetKey

func (t *Model_NoKey_Foo) GetKey() string

GetKey retrieves the value of the leaf Key from the Model_NoKey_Foo 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 (*Model_NoKey_Foo) GetValue

func (t *Model_NoKey_Foo) GetValue() int64

GetValue retrieves the value of the leaf Value from the Model_NoKey_Foo 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 (*Model_NoKey_Foo) IsYANGGoStruct

func (*Model_NoKey_Foo) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_NoKey_Foo implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model_NoKey_Foo) PopulateDefaults

func (t *Model_NoKey_Foo) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model_NoKey_Foo with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model_NoKey_Foo) SetKey

func (t *Model_NoKey_Foo) SetKey(v string)

SetKey sets the value of the leaf Key in the Model_NoKey_Foo struct.

func (*Model_NoKey_Foo) SetValue

func (t *Model_NoKey_Foo) SetValue(v int64)

SetValue sets the value of the leaf Value in the Model_NoKey_Foo struct.

func (*Model_NoKey_Foo) Validate

func (t *Model_NoKey_Foo) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Model_NoKey_Foo) ΛBelongingModule

func (*Model_NoKey_Foo) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model_NoKey_Foo.

func (*Model_NoKey_Foo) ΛEnumTypeMap

func (t *Model_NoKey_Foo) Λ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 (*Model_NoKey_Foo) ΛValidate

func (t *Model_NoKey_Foo) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Model_SingleKey

type Model_SingleKey struct {
	Counter     Binary                                  `path:"state/counter" module:"openconfig-withlistval/openconfig-withlistval"`
	Counters    []Binary                                `path:"state/counters" module:"openconfig-withlistval/openconfig-withlistval"`
	Key         *string                                 `` /* 212-byte string literal not displayed */
	OrderedList map[string]*Model_SingleKey_OrderedList `path:"ordered-lists/ordered-list" module:"openconfig-withlistval/openconfig-withlistval"`
	SingleKey   map[string]*Model_SingleKey_SingleKey   `path:"inner-a/single-key" module:"openconfig-withlistval/openconfig-withlistval"`
	Value       *int64                                  `` /* 162-byte string literal not displayed */
}

Model_SingleKey represents the /openconfig-withlistval/model/a/single-key YANG schema element.

func (*Model_SingleKey) AppendOrderedList

func (t *Model_SingleKey) AppendOrderedList(v *Model_SingleKey_OrderedList) error

AppendOrderedList appends the supplied Model_SingleKey_OrderedList struct to the list OrderedList of Model_SingleKey. If the key value(s) specified in the supplied Model_SingleKey_OrderedList already exist in the list, an error is returned.

func (*Model_SingleKey) AppendSingleKey

func (t *Model_SingleKey) AppendSingleKey(v *Model_SingleKey_SingleKey) error

AppendSingleKey appends the supplied Model_SingleKey_SingleKey struct to the list SingleKey of Model_SingleKey. If the key value(s) specified in the supplied Model_SingleKey_SingleKey already exist in the list, an error is returned.

func (*Model_SingleKey) DeleteOrderedList

func (t *Model_SingleKey) DeleteOrderedList(Key string)

DeleteOrderedList deletes the value with the specified keys from the receiver Model_SingleKey. If there is no such element, the function is a no-op.

func (*Model_SingleKey) DeleteSingleKey

func (t *Model_SingleKey) DeleteSingleKey(Key string)

DeleteSingleKey deletes the value with the specified keys from the receiver Model_SingleKey. If there is no such element, the function is a no-op.

func (*Model_SingleKey) GetCounter added in v0.8.2

func (t *Model_SingleKey) GetCounter() Binary

GetCounter retrieves the value of the leaf Counter from the Model_SingleKey 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 Counter is set, it can safely use t.GetCounter() 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.Counter == nil' before retrieving the leaf's value.

func (*Model_SingleKey) GetCounters added in v0.8.2

func (t *Model_SingleKey) GetCounters() []Binary

GetCounters retrieves the value of the leaf Counters from the Model_SingleKey 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 Counters is set, it can safely use t.GetCounters() 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.Counters == nil' before retrieving the leaf's value.

func (*Model_SingleKey) GetKey

func (t *Model_SingleKey) GetKey() string

GetKey retrieves the value of the leaf Key from the Model_SingleKey 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 (*Model_SingleKey) GetOrCreateOrderedList

func (t *Model_SingleKey) GetOrCreateOrderedList(Key string) *Model_SingleKey_OrderedList

GetOrCreateOrderedList retrieves the value with the specified keys from the receiver Model_SingleKey. If the entry does not exist, then it is created. It returns the existing or new list member.

func (*Model_SingleKey) GetOrCreateSingleKey

func (t *Model_SingleKey) GetOrCreateSingleKey(Key string) *Model_SingleKey_SingleKey

GetOrCreateSingleKey retrieves the value with the specified keys from the receiver Model_SingleKey. If the entry does not exist, then it is created. It returns the existing or new list member.

func (*Model_SingleKey) GetOrderedList

func (t *Model_SingleKey) GetOrderedList(Key string) *Model_SingleKey_OrderedList

GetOrderedList retrieves the value with the specified key from the OrderedList map field of Model_SingleKey. 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 (*Model_SingleKey) GetSingleKey

func (t *Model_SingleKey) GetSingleKey(Key string) *Model_SingleKey_SingleKey

GetSingleKey retrieves the value with the specified key from the SingleKey map field of Model_SingleKey. 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 (*Model_SingleKey) GetValue

func (t *Model_SingleKey) GetValue() int64

GetValue retrieves the value of the leaf Value from the Model_SingleKey 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 (*Model_SingleKey) IsYANGGoStruct

func (*Model_SingleKey) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_SingleKey implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model_SingleKey) NewOrderedList

func (t *Model_SingleKey) NewOrderedList(Key string) (*Model_SingleKey_OrderedList, error)

NewOrderedList creates a new entry in the OrderedList list of the Model_SingleKey struct. The keys of the list are populated from the input arguments.

func (*Model_SingleKey) NewSingleKey

func (t *Model_SingleKey) NewSingleKey(Key string) (*Model_SingleKey_SingleKey, error)

NewSingleKey creates a new entry in the SingleKey list of the Model_SingleKey struct. The keys of the list are populated from the input arguments.

func (*Model_SingleKey) PopulateDefaults

func (t *Model_SingleKey) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model_SingleKey with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model_SingleKey) RenameOrderedList added in v0.10.0

func (t *Model_SingleKey) RenameOrderedList(oldK, newK string) error

RenameOrderedList renames an entry in the list OrderedList within the Model_SingleKey struct. The entry with key oldK is renamed to newK updating the key within the value.

func (*Model_SingleKey) RenameSingleKey added in v0.10.0

func (t *Model_SingleKey) RenameSingleKey(oldK, newK string) error

RenameSingleKey renames an entry in the list SingleKey within the Model_SingleKey struct. The entry with key oldK is renamed to newK updating the key within the value.

func (*Model_SingleKey) SetCounter added in v0.8.2

func (t *Model_SingleKey) SetCounter(v Binary)

SetCounter sets the value of the leaf Counter in the Model_SingleKey struct.

func (*Model_SingleKey) SetCounters added in v0.8.2

func (t *Model_SingleKey) SetCounters(v []Binary)

SetCounters sets the value of the leaf Counters in the Model_SingleKey struct.

func (*Model_SingleKey) SetKey

func (t *Model_SingleKey) SetKey(v string)

SetKey sets the value of the leaf Key in the Model_SingleKey struct.

func (*Model_SingleKey) SetValue

func (t *Model_SingleKey) SetValue(v int64)

SetValue sets the value of the leaf Value in the Model_SingleKey struct.

func (*Model_SingleKey) Validate

func (t *Model_SingleKey) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Model_SingleKey) ΛBelongingModule

func (*Model_SingleKey) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model_SingleKey.

func (*Model_SingleKey) ΛEnumTypeMap

func (t *Model_SingleKey) Λ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 (*Model_SingleKey) ΛListKeyMap

func (t *Model_SingleKey) ΛListKeyMap() (map[string]interface{}, error)

ΛListKeyMap returns the keys of the Model_SingleKey struct, which is a YANG list entry.

func (*Model_SingleKey) ΛValidate

func (t *Model_SingleKey) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Model_SingleKey_OrderedList

type Model_SingleKey_OrderedList struct {
	Key   *string `` /* 212-byte string literal not displayed */
	Value *int64  `` /* 162-byte string literal not displayed */
}

Model_SingleKey_OrderedList represents the /openconfig-withlistval/model/a/single-key/ordered-lists/ordered-list YANG schema element.

func (*Model_SingleKey_OrderedList) GetKey

func (t *Model_SingleKey_OrderedList) GetKey() string

GetKey retrieves the value of the leaf Key from the Model_SingleKey_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 (*Model_SingleKey_OrderedList) GetValue

func (t *Model_SingleKey_OrderedList) GetValue() int64

GetValue retrieves the value of the leaf Value from the Model_SingleKey_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 (*Model_SingleKey_OrderedList) IsYANGGoStruct

func (*Model_SingleKey_OrderedList) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_SingleKey_OrderedList implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model_SingleKey_OrderedList) PopulateDefaults

func (t *Model_SingleKey_OrderedList) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model_SingleKey_OrderedList with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model_SingleKey_OrderedList) SetKey

func (t *Model_SingleKey_OrderedList) SetKey(v string)

SetKey sets the value of the leaf Key in the Model_SingleKey_OrderedList struct.

func (*Model_SingleKey_OrderedList) SetValue

func (t *Model_SingleKey_OrderedList) SetValue(v int64)

SetValue sets the value of the leaf Value in the Model_SingleKey_OrderedList struct.

func (*Model_SingleKey_OrderedList) Validate

Validate validates s against the YANG schema corresponding to its type.

func (*Model_SingleKey_OrderedList) ΛBelongingModule

func (*Model_SingleKey_OrderedList) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model_SingleKey_OrderedList.

func (*Model_SingleKey_OrderedList) ΛEnumTypeMap

func (t *Model_SingleKey_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 (*Model_SingleKey_OrderedList) ΛListKeyMap

func (t *Model_SingleKey_OrderedList) ΛListKeyMap() (map[string]interface{}, error)

ΛListKeyMap returns the keys of the Model_SingleKey_OrderedList struct, which is a YANG list entry.

func (*Model_SingleKey_OrderedList) ΛValidate

func (t *Model_SingleKey_OrderedList) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Model_SingleKey_SingleKey

type Model_SingleKey_SingleKey struct {
	Key   *string `` /* 212-byte string literal not displayed */
	Value *int64  `` /* 162-byte string literal not displayed */
}

Model_SingleKey_SingleKey represents the /openconfig-withlistval/model/a/single-key/inner-a/single-key YANG schema element.

func (*Model_SingleKey_SingleKey) GetKey

func (t *Model_SingleKey_SingleKey) GetKey() string

GetKey retrieves the value of the leaf Key from the Model_SingleKey_SingleKey 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 (*Model_SingleKey_SingleKey) GetValue

func (t *Model_SingleKey_SingleKey) GetValue() int64

GetValue retrieves the value of the leaf Value from the Model_SingleKey_SingleKey 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 (*Model_SingleKey_SingleKey) IsYANGGoStruct

func (*Model_SingleKey_SingleKey) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_SingleKey_SingleKey implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Model_SingleKey_SingleKey) PopulateDefaults

func (t *Model_SingleKey_SingleKey) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Model_SingleKey_SingleKey with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Model_SingleKey_SingleKey) SetKey

func (t *Model_SingleKey_SingleKey) SetKey(v string)

SetKey sets the value of the leaf Key in the Model_SingleKey_SingleKey struct.

func (*Model_SingleKey_SingleKey) SetValue

func (t *Model_SingleKey_SingleKey) SetValue(v int64)

SetValue sets the value of the leaf Value in the Model_SingleKey_SingleKey struct.

func (*Model_SingleKey_SingleKey) Validate

Validate validates s against the YANG schema corresponding to its type.

func (*Model_SingleKey_SingleKey) ΛBelongingModule

func (*Model_SingleKey_SingleKey) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Model_SingleKey_SingleKey.

func (*Model_SingleKey_SingleKey) ΛEnumTypeMap

func (t *Model_SingleKey_SingleKey) Λ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 (*Model_SingleKey_SingleKey) ΛListKeyMap

func (t *Model_SingleKey_SingleKey) ΛListKeyMap() (map[string]interface{}, error)

ΛListKeyMap returns the keys of the Model_SingleKey_SingleKey struct, which is a YANG list entry.

func (*Model_SingleKey_SingleKey) ΛValidate

func (t *Model_SingleKey_SingleKey) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Parent

type Parent struct {
	Child *Parent_Child `path:"child" module:"openconfig-simple"`
}

Parent represents the /openconfig-simple/parent YANG schema element.

func (*Parent) GetChild

func (t *Parent) GetChild() *Parent_Child

GetChild returns the value of the Child struct pointer from Parent. If the receiver or the field Child is nil, nil is returned such that the Get* methods can be safely chained.

func (*Parent) GetOrCreateChild

func (t *Parent) GetOrCreateChild() *Parent_Child

GetOrCreateChild retrieves the value of the Child field or returns the existing field if it already exists.

func (*Parent) IsYANGGoStruct

func (*Parent) IsYANGGoStruct()

IsYANGGoStruct ensures that Parent implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Parent) PopulateDefaults

func (t *Parent) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Parent with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Parent) Validate

func (t *Parent) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Parent) ΛBelongingModule

func (*Parent) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Parent.

func (*Parent) ΛEnumTypeMap

func (t *Parent) Λ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 (*Parent) ΛValidate

func (t *Parent) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Parent_Child

type Parent_Child struct {
	Five  Binary        `` /* 140-byte string literal not displayed */
	Four  Binary        `` /* 140-byte string literal not displayed */
	One   *string       `` /* 138-byte string literal not displayed */
	Six   []Binary      `` /* 138-byte string literal not displayed */
	Three E_Child_Three `` /* 142-byte string literal not displayed */
	Two   *string       `path:"state/two" module:"openconfig-simple/openconfig-simple"`
}

Parent_Child represents the /openconfig-simple/parent/child YANG schema element.

func (*Parent_Child) GetFive

func (t *Parent_Child) GetFive() Binary

GetFive retrieves the value of the leaf Five from the Parent_Child 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 Five is set, it can safely use t.GetFive() 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.Five == nil' before retrieving the leaf's value.

func (*Parent_Child) GetFour

func (t *Parent_Child) GetFour() Binary

GetFour retrieves the value of the leaf Four from the Parent_Child 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 Four is set, it can safely use t.GetFour() 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.Four == nil' before retrieving the leaf's value.

func (*Parent_Child) GetOne

func (t *Parent_Child) GetOne() string

GetOne retrieves the value of the leaf One from the Parent_Child 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 One is set, it can safely use t.GetOne() 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.One == nil' before retrieving the leaf's value.

func (*Parent_Child) GetSix

func (t *Parent_Child) GetSix() []Binary

GetSix retrieves the value of the leaf Six from the Parent_Child 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 Six is set, it can safely use t.GetSix() 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.Six == nil' before retrieving the leaf's value.

func (*Parent_Child) GetThree

func (t *Parent_Child) GetThree() E_Child_Three

GetThree retrieves the value of the leaf Three from the Parent_Child 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 Three is set, it can safely use t.GetThree() 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.Three == nil' before retrieving the leaf's value.

func (*Parent_Child) GetTwo

func (t *Parent_Child) GetTwo() string

GetTwo retrieves the value of the leaf Two from the Parent_Child 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 Two is set, it can safely use t.GetTwo() 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.Two == nil' before retrieving the leaf's value.

func (*Parent_Child) IsYANGGoStruct

func (*Parent_Child) IsYANGGoStruct()

IsYANGGoStruct ensures that Parent_Child implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Parent_Child) PopulateDefaults

func (t *Parent_Child) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Parent_Child with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Parent_Child) SetFive

func (t *Parent_Child) SetFive(v Binary)

SetFive sets the value of the leaf Five in the Parent_Child struct.

func (*Parent_Child) SetFour

func (t *Parent_Child) SetFour(v Binary)

SetFour sets the value of the leaf Four in the Parent_Child struct.

func (*Parent_Child) SetOne

func (t *Parent_Child) SetOne(v string)

SetOne sets the value of the leaf One in the Parent_Child struct.

func (*Parent_Child) SetSix

func (t *Parent_Child) SetSix(v []Binary)

SetSix sets the value of the leaf Six in the Parent_Child struct.

func (*Parent_Child) SetThree

func (t *Parent_Child) SetThree(v E_Child_Three)

SetThree sets the value of the leaf Three in the Parent_Child struct.

func (*Parent_Child) SetTwo

func (t *Parent_Child) SetTwo(v string)

SetTwo sets the value of the leaf Two in the Parent_Child struct.

func (*Parent_Child) Validate

func (t *Parent_Child) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Parent_Child) ΛBelongingModule

func (*Parent_Child) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Parent_Child.

func (*Parent_Child) ΛEnumTypeMap

func (t *Parent_Child) Λ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 (*Parent_Child) ΛValidate

func (t *Parent_Child) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type RemoteContainer

type RemoteContainer struct {
	ALeaf *string `` /* 144-byte string literal not displayed */
}

RemoteContainer represents the /openconfig-simple/remote-container YANG schema element.

func (*RemoteContainer) GetALeaf

func (t *RemoteContainer) GetALeaf() string

GetALeaf retrieves the value of the leaf ALeaf from the RemoteContainer 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 ALeaf is set, it can safely use t.GetALeaf() 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.ALeaf == nil' before retrieving the leaf's value.

func (*RemoteContainer) IsYANGGoStruct

func (*RemoteContainer) IsYANGGoStruct()

IsYANGGoStruct ensures that RemoteContainer implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*RemoteContainer) PopulateDefaults

func (t *RemoteContainer) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the RemoteContainer with default values as specified in the YANG schema, instantiating any nil container fields.

func (*RemoteContainer) SetALeaf

func (t *RemoteContainer) SetALeaf(v string)

SetALeaf sets the value of the leaf ALeaf in the RemoteContainer struct.

func (*RemoteContainer) Validate

func (t *RemoteContainer) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*RemoteContainer) ΛBelongingModule

func (*RemoteContainer) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of RemoteContainer.

func (*RemoteContainer) ΛEnumTypeMap

func (t *RemoteContainer) Λ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 (*RemoteContainer) ΛValidate

func (t *RemoteContainer) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

type Root

type Root struct {
	A               *A               `path:"a" module:"openconfig-nested"`
	Container       *Container       `path:"container" module:"openconfig-nested"`
	Model           *Model           `path:"model" module:"openconfig-withlistval"`
	Parent          *Parent          `path:"parent" module:"openconfig-simple"`
	RemoteContainer *RemoteContainer `path:"remote-container" module:"openconfig-simple"`
}

Root represents the /root YANG schema element.

func (*Root) GetA

func (t *Root) GetA() *A

GetA returns the value of the A struct pointer from Root. If the receiver or the field A is nil, nil is returned such that the Get* methods can be safely chained.

func (*Root) GetContainer added in v0.8.1

func (t *Root) GetContainer() *Container

GetContainer returns the value of the Container struct pointer from Root. If the receiver or the field Container is nil, nil is returned such that the Get* methods can be safely chained.

func (*Root) GetModel

func (t *Root) GetModel() *Model

GetModel returns the value of the Model struct pointer from Root. If the receiver or the field Model is nil, nil is returned such that the Get* methods can be safely chained.

func (*Root) GetOrCreateA

func (t *Root) GetOrCreateA() *A

GetOrCreateA retrieves the value of the A field or returns the existing field if it already exists.

func (*Root) GetOrCreateContainer added in v0.8.1

func (t *Root) GetOrCreateContainer() *Container

GetOrCreateContainer retrieves the value of the Container field or returns the existing field if it already exists.

func (*Root) GetOrCreateModel

func (t *Root) GetOrCreateModel() *Model

GetOrCreateModel retrieves the value of the Model field or returns the existing field if it already exists.

func (*Root) GetOrCreateParent

func (t *Root) GetOrCreateParent() *Parent

GetOrCreateParent retrieves the value of the Parent field or returns the existing field if it already exists.

func (*Root) GetOrCreateRemoteContainer

func (t *Root) GetOrCreateRemoteContainer() *RemoteContainer

GetOrCreateRemoteContainer retrieves the value of the RemoteContainer field or returns the existing field if it already exists.

func (*Root) GetParent

func (t *Root) GetParent() *Parent

GetParent returns the value of the Parent struct pointer from Root. If the receiver or the field Parent is nil, nil is returned such that the Get* methods can be safely chained.

func (*Root) GetRemoteContainer

func (t *Root) GetRemoteContainer() *RemoteContainer

GetRemoteContainer returns the value of the RemoteContainer struct pointer from Root. If the receiver or the field RemoteContainer is nil, nil is returned such that the Get* methods can be safely chained.

func (*Root) IsYANGGoStruct

func (*Root) IsYANGGoStruct()

IsYANGGoStruct ensures that Root implements the yang.GoStruct interface. This allows functions that need to handle this struct to identify it as being generated by ygen.

func (*Root) PopulateDefaults

func (t *Root) PopulateDefaults()

PopulateDefaults recursively populates unset leaf fields in the Root with default values as specified in the YANG schema, instantiating any nil container fields.

func (*Root) Validate

func (t *Root) Validate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

func (*Root) ΛBelongingModule

func (*Root) ΛBelongingModule() string

ΛBelongingModule returns the name of the module that defines the namespace of Root.

func (*Root) ΛEnumTypeMap

func (t *Root) Λ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 (*Root) ΛValidate

func (t *Root) ΛValidate(opts ...ygot.ValidationOption) error

Validate validates s against the YANG schema corresponding to its type.

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 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 UnionInt8

type UnionInt8 int8

UnionInt8 is an int8 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 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 UnionUint8

type UnionUint8 uint8

UnionUint8 is a uint8 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 YANGEmpty

type YANGEmpty bool

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.

Directories

Path Synopsis
Package exampleocunorderedpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package exampleocunorderedpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package nested is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package nested is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package simple is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package simple is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package withlistval is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package withlistval is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL