setpathorigin

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package setpathorigin 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.34.0) using the following YANG input files:

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

Imported modules were sourced from:

Package setpathorigin 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.34.0) using the following YANG input files:

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

Imported modules were sourced from:

Package setpathorigin 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.34.0) using the following YANG input files:

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

Imported modules were sourced from:

Package setpathorigin 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.34.0) using the following YANG input files:

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

Imported modules were sourced from:

Package setpathorigin 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.34.0) using the following YANG input files:

  • ../../pathgen/testdata/yang/openconfig-simple.yang
  • ../../pathgen/testdata/yang/openconfig-withlistval.yang
  • ../../pathgen/testdata/yang/openconfig-nested.yang
  • ../../pathgen/testdata/yang/openconfig-unione.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"},
	},
	"E_Component_Power_Enum": {
		1: {Name: "ON"},
		2: {Name: "OFF"},
	},
	"E_DupEnum_A": {
		1: {Name: "A_A"},
		2: {Name: "A_B"},
	},
	"E_DupEnum_B": {
		1: {Name: "B_A"},
		2: {Name: "B_B"},
	},
	"E_Unione_EnumOne": {
		1: {Name: "ONE"},
	},
	"E_Unione_HARDWARE": {
		1: {Name: "CARD", DefiningModule: "openconfig-unione"},
	},
	"E_Unione_SOFTWARE": {
		1: {Name: "OS", DefiningModule: "openconfig-unione"},
	},
}

Λ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 Component added in v0.14.0

type Component struct {
	E1         Component_E1_Union         `path:"state/e1" module:"openconfig-unione/openconfig-unione"`
	Enumerated Component_Enumerated_Union `path:"state/enumerated" module:"openconfig-unione/openconfig-unione"`
	Name       *string                    `` /* 186-byte string literal not displayed */
	Power      Component_Power_Union      `path:"state/power" module:"openconfig-unione/openconfig-unione"`
	R1         Component_E1_Union         `path:"state/r1" module:"openconfig-unione/openconfig-unione"`
	Type       Component_Type_Union       `path:"state/type" module:"openconfig-unione/openconfig-unione"`
}

Component represents the /openconfig-unione/platform/component YANG schema element.

func (*Component) GetE1 added in v0.14.0

func (t *Component) GetE1() Component_E1_Union

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

func (*Component) GetEnumerated added in v0.14.0

func (t *Component) GetEnumerated() Component_Enumerated_Union

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

func (*Component) GetName added in v0.14.0

func (t *Component) GetName() string

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

func (*Component) GetPower added in v0.14.0

func (t *Component) GetPower() Component_Power_Union

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

func (*Component) GetR1 added in v0.14.0

func (t *Component) GetR1() Component_E1_Union

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

func (*Component) GetType added in v0.14.0

func (t *Component) GetType() Component_Type_Union

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

func (*Component) IsYANGGoStruct added in v0.14.0

func (*Component) IsYANGGoStruct()

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

func (*Component) PopulateDefaults added in v0.14.0

func (t *Component) PopulateDefaults()

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

func (*Component) SetE1 added in v0.14.0

func (t *Component) SetE1(v Component_E1_Union)

SetE1 sets the value of the leaf E1 in the Component struct.

func (*Component) SetEnumerated added in v0.14.0

func (t *Component) SetEnumerated(v Component_Enumerated_Union)

SetEnumerated sets the value of the leaf Enumerated in the Component struct.

func (*Component) SetName added in v0.14.0

func (t *Component) SetName(v string)

SetName sets the value of the leaf Name in the Component struct.

func (*Component) SetPower added in v0.14.0

func (t *Component) SetPower(v Component_Power_Union)

SetPower sets the value of the leaf Power in the Component struct.

func (*Component) SetR1 added in v0.14.0

func (t *Component) SetR1(v Component_E1_Union)

SetR1 sets the value of the leaf R1 in the Component struct.

func (*Component) SetType added in v0.14.0

func (t *Component) SetType(v Component_Type_Union)

SetType sets the value of the leaf Type in the Component struct.

func (*Component) To_Component_E1_Union added in v0.14.0

func (t *Component) To_Component_E1_Union(i interface{}) (Component_E1_Union, error)

To_Component_E1_Union takes an input interface{} and attempts to convert it to a struct which implements the Component_E1_Union union. It returns an error if the interface{} supplied cannot be converted to a type within the union.

func (*Component) To_Component_Enumerated_Union added in v0.14.0

func (t *Component) To_Component_Enumerated_Union(i interface{}) (Component_Enumerated_Union, error)

To_Component_Enumerated_Union takes an input interface{} and attempts to convert it to a struct which implements the Component_Enumerated_Union union. It returns an error if the interface{} supplied cannot be converted to a type within the union.

func (*Component) To_Component_Power_Union added in v0.14.0

func (t *Component) To_Component_Power_Union(i interface{}) (Component_Power_Union, error)

To_Component_Power_Union takes an input interface{} and attempts to convert it to a struct which implements the Component_Power_Union union. It returns an error if the interface{} supplied cannot be converted to a type within the union.

func (*Component) To_Component_Type_Union added in v0.14.0

func (t *Component) To_Component_Type_Union(i interface{}) (Component_Type_Union, error)

To_Component_Type_Union takes an input interface{} and attempts to convert it to a struct which implements the Component_Type_Union union. It returns an error if the interface{} supplied cannot be converted to a type within the union.

func (*Component) Validate added in v0.14.0

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

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

func (*Component) ΛBelongingModule added in v0.14.0

func (*Component) ΛBelongingModule() string

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

func (*Component) ΛEnumTypeMap added in v0.14.0

func (t *Component) Λ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 (*Component) ΛListKeyMap added in v0.14.0

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

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

func (*Component) ΛValidate added in v0.14.0

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

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

type Component_E1_Union added in v0.14.0

type Component_E1_Union interface {
	// Union type can be one of [UnionString, UnionUint32]
	Documentation_for_Component_E1_Union()
}

Component_E1_Union is an interface that is implemented by valid types for the union for the leaf /openconfig-unione/platform/component/state/e1 within the YANG schema. Union type can be one of [UnionString, UnionUint32].

type Component_Enumerated_Union added in v0.14.0

type Component_Enumerated_Union interface {
	// Union type can be one of [E_Unione_EnumOne, UnionString]
	Documentation_for_Component_Enumerated_Union()
}

Component_Enumerated_Union is an interface that is implemented by valid types for the union for the leaf /openconfig-unione/platform/component/state/enumerated within the YANG schema. Union type can be one of [E_Unione_EnumOne, UnionString].

type Component_Power_Union added in v0.14.0

type Component_Power_Union interface {
	// Union type can be one of [*UnionUnsupported, E_Component_Power_Enum, UnionUint32]
	Documentation_for_Component_Power_Union()
}

Component_Power_Union is an interface that is implemented by valid types for the union for the leaf /openconfig-unione/platform/component/state/power within the YANG schema. Union type can be one of [*UnionUnsupported, E_Component_Power_Enum, UnionUint32].

type Component_Type_Union added in v0.14.0

type Component_Type_Union interface {
	// Union type can be one of [E_Unione_HARDWARE, E_Unione_SOFTWARE]
	Documentation_for_Component_Type_Union()
}

Component_Type_Union is an interface that is implemented by valid types for the union for the leaf /openconfig-unione/platform/component/state/type within the YANG schema. Union type can be one of [E_Unione_HARDWARE, E_Unione_SOFTWARE].

type Container

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

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

func (*Container) GetEnabled

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

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

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

func (t *Container) SetEnabled(v bool)

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

func (*Container) Validate

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

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

func (*Container) ΛBelongingModule

func (*Container) ΛBelongingModule() string

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

func (*Container) ΛEnumTypeMap

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

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

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

type DupEnum added in v0.14.0

type DupEnum struct {
	A E_DupEnum_A `path:"state/A" module:"openconfig-unione/openconfig-unione"`
	B E_DupEnum_B `path:"state/B" module:"openconfig-unione/openconfig-unione"`
}

DupEnum represents the /openconfig-unione/dup-enum YANG schema element.

func (*DupEnum) GetA added in v0.14.0

func (t *DupEnum) GetA() E_DupEnum_A

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

func (*DupEnum) GetB added in v0.14.0

func (t *DupEnum) GetB() E_DupEnum_B

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

func (*DupEnum) IsYANGGoStruct added in v0.14.0

func (*DupEnum) IsYANGGoStruct()

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

func (*DupEnum) PopulateDefaults added in v0.14.0

func (t *DupEnum) PopulateDefaults()

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

func (*DupEnum) SetA added in v0.14.0

func (t *DupEnum) SetA(v E_DupEnum_A)

SetA sets the value of the leaf A in the DupEnum struct.

func (*DupEnum) SetB added in v0.14.0

func (t *DupEnum) SetB(v E_DupEnum_B)

SetB sets the value of the leaf B in the DupEnum struct.

func (*DupEnum) Validate added in v0.14.0

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

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

func (*DupEnum) ΛBelongingModule added in v0.14.0

func (*DupEnum) ΛBelongingModule() string

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

func (*DupEnum) ΛEnumTypeMap added in v0.14.0

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

func (t *DupEnum) Λ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 E_Component_Power_Enum added in v0.14.0

type E_Component_Power_Enum int64

E_Component_Power_Enum is a derived int64 type which is used to represent the enumerated node Component_Power_Enum. An additional value named Component_Power_Enum_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 (
	// Component_Power_Enum_UNSET corresponds to the value UNSET of Component_Power_Enum
	Component_Power_Enum_UNSET E_Component_Power_Enum = 0
	// Component_Power_Enum_ON corresponds to the value ON of Component_Power_Enum
	Component_Power_Enum_ON E_Component_Power_Enum = 1
	// Component_Power_Enum_OFF corresponds to the value OFF of Component_Power_Enum
	Component_Power_Enum_OFF E_Component_Power_Enum = 2
)

func (E_Component_Power_Enum) Documentation_for_Component_Power_Union added in v0.14.0

func (E_Component_Power_Enum) Documentation_for_Component_Power_Union()

Documentation_for_Component_Power_Union ensures that E_Component_Power_Enum implements the Component_Power_Union interface.

func (E_Component_Power_Enum) IsYANGGoEnum added in v0.14.0

func (E_Component_Power_Enum) IsYANGGoEnum()

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

func (E_Component_Power_Enum) String added in v0.14.0

func (e E_Component_Power_Enum) String() string

String returns a logging-friendly string for E_Component_Power_Enum.

func (E_Component_Power_Enum) ΛMap added in v0.14.0

ΛMap returns the value lookup map associated with Component_Power_Enum.

type E_DupEnum_A added in v0.14.0

type E_DupEnum_A int64

E_DupEnum_A is a derived int64 type which is used to represent the enumerated node DupEnum_A. An additional value named DupEnum_A_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 (
	// DupEnum_A_UNSET corresponds to the value UNSET of DupEnum_A
	DupEnum_A_UNSET E_DupEnum_A = 0
	// DupEnum_A_A_A corresponds to the value A_A of DupEnum_A
	DupEnum_A_A_A E_DupEnum_A = 1
	// DupEnum_A_A_B corresponds to the value A_B of DupEnum_A
	DupEnum_A_A_B E_DupEnum_A = 2
)

func (E_DupEnum_A) IsYANGGoEnum added in v0.14.0

func (E_DupEnum_A) IsYANGGoEnum()

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

func (E_DupEnum_A) String added in v0.14.0

func (e E_DupEnum_A) String() string

String returns a logging-friendly string for E_DupEnum_A.

func (E_DupEnum_A) ΛMap added in v0.14.0

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

ΛMap returns the value lookup map associated with DupEnum_A.

type E_DupEnum_B added in v0.14.0

type E_DupEnum_B int64

E_DupEnum_B is a derived int64 type which is used to represent the enumerated node DupEnum_B. An additional value named DupEnum_B_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 (
	// DupEnum_B_UNSET corresponds to the value UNSET of DupEnum_B
	DupEnum_B_UNSET E_DupEnum_B = 0
	// DupEnum_B_B_A corresponds to the value B_A of DupEnum_B
	DupEnum_B_B_A E_DupEnum_B = 1
	// DupEnum_B_B_B corresponds to the value B_B of DupEnum_B
	DupEnum_B_B_B E_DupEnum_B = 2
)

func (E_DupEnum_B) IsYANGGoEnum added in v0.14.0

func (E_DupEnum_B) IsYANGGoEnum()

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

func (E_DupEnum_B) String added in v0.14.0

func (e E_DupEnum_B) String() string

String returns a logging-friendly string for E_DupEnum_B.

func (E_DupEnum_B) ΛMap added in v0.14.0

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

ΛMap returns the value lookup map associated with DupEnum_B.

type E_Unione_EnumOne added in v0.14.0

type E_Unione_EnumOne int64

E_Unione_EnumOne is a derived int64 type which is used to represent the enumerated node Unione_EnumOne. An additional value named Unione_EnumOne_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 (
	// Unione_EnumOne_UNSET corresponds to the value UNSET of Unione_EnumOne
	Unione_EnumOne_UNSET E_Unione_EnumOne = 0
	// Unione_EnumOne_ONE corresponds to the value ONE of Unione_EnumOne
	Unione_EnumOne_ONE E_Unione_EnumOne = 1
)

func (E_Unione_EnumOne) Documentation_for_Component_Enumerated_Union added in v0.14.0

func (E_Unione_EnumOne) Documentation_for_Component_Enumerated_Union()

Documentation_for_Component_Enumerated_Union ensures that E_Unione_EnumOne implements the Component_Enumerated_Union interface.

func (E_Unione_EnumOne) IsYANGGoEnum added in v0.14.0

func (E_Unione_EnumOne) IsYANGGoEnum()

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

func (E_Unione_EnumOne) String added in v0.14.0

func (e E_Unione_EnumOne) String() string

String returns a logging-friendly string for E_Unione_EnumOne.

func (E_Unione_EnumOne) ΛMap added in v0.14.0

ΛMap returns the value lookup map associated with Unione_EnumOne.

type E_Unione_HARDWARE added in v0.14.0

type E_Unione_HARDWARE int64

E_Unione_HARDWARE is a derived int64 type which is used to represent the enumerated node Unione_HARDWARE. An additional value named Unione_HARDWARE_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 (
	// Unione_HARDWARE_UNSET corresponds to the value UNSET of Unione_HARDWARE
	Unione_HARDWARE_UNSET E_Unione_HARDWARE = 0
	// Unione_HARDWARE_CARD corresponds to the value CARD of Unione_HARDWARE
	Unione_HARDWARE_CARD E_Unione_HARDWARE = 1
)

func (E_Unione_HARDWARE) Documentation_for_Component_Type_Union added in v0.14.0

func (E_Unione_HARDWARE) Documentation_for_Component_Type_Union()

Documentation_for_Component_Type_Union ensures that E_Unione_HARDWARE implements the Component_Type_Union interface.

func (E_Unione_HARDWARE) IsYANGGoEnum added in v0.14.0

func (E_Unione_HARDWARE) IsYANGGoEnum()

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

func (E_Unione_HARDWARE) String added in v0.14.0

func (e E_Unione_HARDWARE) String() string

String returns a logging-friendly string for E_Unione_HARDWARE.

func (E_Unione_HARDWARE) ΛMap added in v0.14.0

ΛMap returns the value lookup map associated with Unione_HARDWARE.

type E_Unione_SOFTWARE added in v0.14.0

type E_Unione_SOFTWARE int64

E_Unione_SOFTWARE is a derived int64 type which is used to represent the enumerated node Unione_SOFTWARE. An additional value named Unione_SOFTWARE_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 (
	// Unione_SOFTWARE_UNSET corresponds to the value UNSET of Unione_SOFTWARE
	Unione_SOFTWARE_UNSET E_Unione_SOFTWARE = 0
	// Unione_SOFTWARE_OS corresponds to the value OS of Unione_SOFTWARE
	Unione_SOFTWARE_OS E_Unione_SOFTWARE = 1
)

func (E_Unione_SOFTWARE) Documentation_for_Component_Type_Union added in v0.14.0

func (E_Unione_SOFTWARE) Documentation_for_Component_Type_Union()

Documentation_for_Component_Type_Union ensures that E_Unione_SOFTWARE implements the Component_Type_Union interface.

func (E_Unione_SOFTWARE) IsYANGGoEnum added in v0.14.0

func (E_Unione_SOFTWARE) IsYANGGoEnum()

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

func (E_Unione_SOFTWARE) String added in v0.14.0

func (e E_Unione_SOFTWARE) String() string

String returns a logging-friendly string for E_Unione_SOFTWARE.

func (E_Unione_SOFTWARE) ΛMap added in v0.14.0

ΛMap returns the value lookup map associated with Unione_SOFTWARE.

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) GetOrCreateMultiKeyMap

func (t *Model) GetOrCreateMultiKeyMap() map[Model_MultiKey_Key]*Model_MultiKey

GetOrCreateMultiKeyMap returns the list (map) from Model.

It initializes the field if not already initialized.

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) GetOrCreateSingleKeyMap

func (t *Model) GetOrCreateSingleKeyMap() map[string]*Model_SingleKey

GetOrCreateSingleKeyMap returns the list (map) from Model.

It initializes the field if not already initialized.

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

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

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 */
	NestedList  map[string]*Model_SingleKey_NestedList  `path:"nested-lists/nested-list" module:"openconfig-withlistval/openconfig-withlistval"`
	OrderedList *Model_SingleKey_OrderedList_OrderedMap `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) AppendNestedList

func (t *Model_SingleKey) AppendNestedList(v *Model_SingleKey_NestedList) error

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

func (*Model_SingleKey) AppendNewOrderedList

func (s *Model_SingleKey) AppendNewOrderedList(Key string) (*Model_SingleKey_OrderedList, error)

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

func (*Model_SingleKey) AppendOrderedList

func (s *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) DeleteNestedList

func (t *Model_SingleKey) DeleteNestedList(Key string)

DeleteNestedList 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) DeleteOrderedList

func (s *Model_SingleKey) DeleteOrderedList(Key string) bool

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

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

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) GetNestedList

func (t *Model_SingleKey) GetNestedList(Key string) *Model_SingleKey_NestedList

GetNestedList retrieves the value with the specified key from the NestedList 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) GetOrCreateNestedList

func (t *Model_SingleKey) GetOrCreateNestedList(Key string) *Model_SingleKey_NestedList

GetOrCreateNestedList 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) GetOrCreateNestedListMap

func (t *Model_SingleKey) GetOrCreateNestedListMap() map[string]*Model_SingleKey_NestedList

GetOrCreateNestedListMap returns the list (map) from Model_SingleKey.

It initializes the field if not already initialized.

func (*Model_SingleKey) GetOrCreateOrderedListMap

func (s *Model_SingleKey) GetOrCreateOrderedListMap() *Model_SingleKey_OrderedList_OrderedMap

GetOrCreateOrderedListMap returns the ordered map field OrderedList from Model_SingleKey.

It initializes the field if not already initialized.

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) GetOrCreateSingleKeyMap

func (t *Model_SingleKey) GetOrCreateSingleKeyMap() map[string]*Model_SingleKey_SingleKey

GetOrCreateSingleKeyMap returns the list (map) from Model_SingleKey.

It initializes the field if not already initialized.

func (*Model_SingleKey) GetOrderedList

func (s *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) NewNestedList

func (t *Model_SingleKey) NewNestedList(Key string) (*Model_SingleKey_NestedList, error)

NewNestedList creates a new entry in the NestedList 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) RenameNestedList

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

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

func (*Model_SingleKey) RenameSingleKey

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

func (t *Model_SingleKey) SetCounter(v Binary)

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

func (*Model_SingleKey) SetCounters

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_NestedList

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

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

func (*Model_SingleKey_NestedList) GetKey

func (t *Model_SingleKey_NestedList) GetKey() string

GetKey retrieves the value of the leaf Key from the Model_SingleKey_NestedList 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_NestedList) GetValue

func (t *Model_SingleKey_NestedList) GetValue() int64

GetValue retrieves the value of the leaf Value from the Model_SingleKey_NestedList 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_NestedList) IsYANGGoStruct

func (*Model_SingleKey_NestedList) IsYANGGoStruct()

IsYANGGoStruct ensures that Model_SingleKey_NestedList 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_NestedList) PopulateDefaults

func (t *Model_SingleKey_NestedList) PopulateDefaults()

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

func (*Model_SingleKey_NestedList) SetKey

func (t *Model_SingleKey_NestedList) SetKey(v string)

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

func (*Model_SingleKey_NestedList) SetValue

func (t *Model_SingleKey_NestedList) SetValue(v int64)

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

func (*Model_SingleKey_NestedList) Validate

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

func (*Model_SingleKey_NestedList) ΛBelongingModule

func (*Model_SingleKey_NestedList) ΛBelongingModule() string

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

func (*Model_SingleKey_NestedList) ΛEnumTypeMap

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

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

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

func (*Model_SingleKey_NestedList) ΛValidate

func (t *Model_SingleKey_NestedList) Λ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_OrderedList_OrderedMap

type Model_SingleKey_OrderedList_OrderedMap struct {
	// contains filtered or unexported fields
}

Model_SingleKey_OrderedList_OrderedMap is an ordered map that represents the "ordered-by user" list elements at /openconfig-withlistval/model/a/single-key/ordered-lists/ordered-list.

func (*Model_SingleKey_OrderedList_OrderedMap) Append

Append appends a Model_SingleKey_OrderedList, returning an error if the key already exists in the ordered list or if the key is unspecified.

func (*Model_SingleKey_OrderedList_OrderedMap) AppendNew

AppendNew creates and appends a new Model_SingleKey_OrderedList, returning the newly-initialized v. It returns an error if the v already exists.

func (*Model_SingleKey_OrderedList_OrderedMap) Delete

Delete deletes an element.

func (*Model_SingleKey_OrderedList_OrderedMap) Get

Get returns the value corresponding to the key. If the key is not found, nil is returned.

func (*Model_SingleKey_OrderedList_OrderedMap) IsYANGOrderedList

func (*Model_SingleKey_OrderedList_OrderedMap) IsYANGOrderedList()

IsYANGOrderedList ensures that Model_SingleKey_OrderedList_OrderedMap implements the ygot.GoOrderedMap interface.

func (*Model_SingleKey_OrderedList_OrderedMap) Keys

Keys returns a copy of the list's keys.

func (*Model_SingleKey_OrderedList_OrderedMap) Len

Len returns a size of Model_SingleKey_OrderedList_OrderedMap

func (*Model_SingleKey_OrderedList_OrderedMap) Values

Values returns the current set of the list's values in order.

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"`
	Component       map[string]*Component `path:"platform/component" module:"openconfig-unione/openconfig-unione"`
	Container       *Container            `path:"container" module:"openconfig-nested"`
	DupEnum         *DupEnum              `path:"dup-enum" module:"openconfig-unione"`
	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) AppendComponent added in v0.14.0

func (t *Root) AppendComponent(v *Component) error

AppendComponent appends the supplied Component struct to the list Component of Root. If the key value(s) specified in the supplied Component already exist in the list, an error is returned.

func (*Root) DeleteComponent added in v0.14.0

func (t *Root) DeleteComponent(Name string)

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

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) GetComponent added in v0.14.0

func (t *Root) GetComponent(Name string) *Component

GetComponent retrieves the value with the specified key from the Component map field of Root. 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 (*Root) GetContainer

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) GetDupEnum added in v0.14.0

func (t *Root) GetDupEnum() *DupEnum

GetDupEnum returns the value of the DupEnum struct pointer from Root. If the receiver or the field DupEnum 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) GetOrCreateComponent added in v0.14.0

func (t *Root) GetOrCreateComponent(Name string) *Component

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

func (*Root) GetOrCreateComponentMap added in v0.14.0

func (t *Root) GetOrCreateComponentMap() map[string]*Component

GetOrCreateComponentMap returns the list (map) from Root.

It initializes the field if not already initialized.

func (*Root) GetOrCreateContainer

func (t *Root) GetOrCreateContainer() *Container

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

func (*Root) GetOrCreateDupEnum added in v0.14.0

func (t *Root) GetOrCreateDupEnum() *DupEnum

GetOrCreateDupEnum retrieves the value of the DupEnum 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) NewComponent added in v0.14.0

func (t *Root) NewComponent(Name string) (*Component, error)

NewComponent creates a new entry in the Component list of the Root struct. The keys of the list are populated from the input arguments.

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) RenameComponent added in v0.14.0

func (t *Root) RenameComponent(oldK, newK string) error

RenameComponent renames an entry in the list Component within the Root struct. The entry with key oldK is renamed to newK updating the key within the value.

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

func (UnionString) Documentation_for_Component_E1_Union added in v0.14.0

func (UnionString) Documentation_for_Component_E1_Union()

Documentation_for_Component_E1_Union ensures that UnionString implements the Component_E1_Union interface.

func (UnionString) Documentation_for_Component_Enumerated_Union added in v0.14.0

func (UnionString) Documentation_for_Component_Enumerated_Union()

Documentation_for_Component_Enumerated_Union ensures that UnionString implements the Component_Enumerated_Union interface.

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.

func (UnionUint32) Documentation_for_Component_E1_Union added in v0.14.0

func (UnionUint32) Documentation_for_Component_E1_Union()

Documentation_for_Component_E1_Union ensures that UnionUint32 implements the Component_E1_Union interface.

func (UnionUint32) Documentation_for_Component_Power_Union added in v0.14.0

func (UnionUint32) Documentation_for_Component_Power_Union()

Documentation_for_Component_Power_Union ensures that UnionUint32 implements the Component_Power_Union interface.

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.

func (*UnionUnsupported) Documentation_for_Component_Power_Union added in v0.14.0

func (*UnionUnsupported) Documentation_for_Component_Power_Union()

Documentation_for_Component_Power_Union ensures that *UnionUnsupported implements the Component_Power_Union interface.

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
a
Package a is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package a is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package modelb is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package modelb is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package setpathoriginpath is a generated package which contains definitions of structs which generate gNMI paths for a YANG schema.
Package setpathoriginpath 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